ASP: SMTP authentication is not performed using JMail

I have a little specific problem. One of the sites I care about runs ASP and receives a form, the results of which are sent by email to a specific address.

For this, the JMail component is used . As long as the email was sent locally (say to user@clientserver.com via mailserver mail.clientserver.com), there were no problems and there was no need for authentication. However, I recently received a request to add another copy address ( copy@differentserver.com ) and that if a problem occurs.

Firstly, I tried to add authentication, but the same error still occurred if:

jmail.Message error '8000ffff'

Message was unavailable. All servers did not receive the message.

I tried Google solutions, liked some values. I am sure that the user and password are correct, the mail server address also worked when I did not try to send authenticated mail.

Since I prefer PHP, my knowledge and skills with ASP are not the best. Did someone experience something similar and decide? Or does anyone know some other solution?

Code used to send mail:

set msg = Server.CreateOBject( "JMail.Message" )
msg.Charset = "windows-1250"
msg.Logging = true
msg.From= "from@mail.com"
msg.FromName= name&" - "&mail

'those should care of smtp auth
msg.MailServerUserName = "smtpuser@localmailserver.com"
msg.MailServerPassword = "smtppass"

'local mail address
msg.AddRecipient "user@localmailserver.com"         
'outside mail address
msg.AddRecipient "address@differentmail.com"

msg.Subject = "Some subject"
msg.Body = "Some text"

if not msg.Send( "mail.localmailserver.com" ) then
    Response.write "<pre>" & msg.log & "</pre>"
else
    'Succesfully sent, redirect
    Response.Redirect("mailjob_sent.asp")
end if  
+4
source share
1 answer

So, the problem is finally solved. After the help of my colleague in charge of the local mail server, we found out that the problem was the username for SMTP authentication.

, smtpuser@localmailserver.com( , ), smtpuser@localdomainname.com.

, ( ) (.. Thunderbird), , . .

+1

Source: https://habr.com/ru/post/1531134/


All Articles