سؤال

I have a bit specific problem. One of the websites I am taking care of runs on ASP and obtains form, whose results are e-mailed to specific address.

For this to achieve, JMail component is used. As long as e-mail was sent locally (let say to user@clientserver.com through mailserver mail.clientserver.com), there was no problem and no need for authentication. However I recently got request to add another address to copy(copy@differentserver.com) and that's when problem occurred.

Firstly I tried adding authentication, however same error still occurred, when without:

jmail.Message error '8000ffff'

The message was undeliverable. All servers failed to receive the message

I tried google solutions, temper with some valuables. I am sure user and pass are correct, mail server address also worked when I wasn't try to sent mail with authentication.

Since I prefer PHP, my knowledge and skill with ASP are not of the bests. Have someone experienced something similar and solved it? Or does anyone know some other solution?

The code, which is used for sending 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  
هل كانت مفيدة؟

المحلول

So the problem is solved at last. After help with analysis by my colleagues responsible for local mailserver, we found out, the problem was username for SMTP authentification.

I got confused, since it wasn't smtpuser@localmailserver.com (I'm referring to example I made), but smtpuser@localdomainname.com.

So advice for others with similar problem, try to add testing account(one you are using for authentification) to your e-mail client(i.e. Thunderbird) and once that is allright, you have right credentials. Also try sending mail from that account elsewhere.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top