سلام،
من صفحه ای با ASP.NET و VB.NET دارم که توش باید یه پیغامی رو ایمیل بکنم. تا دو دقیقه پیش کار می کرد اما الان همون صفحه بدون هیچ تغییری کار نمی کنه در حالیکه همه authentication ها درستن. اینم کدهای من و ایرادی که سیستم میگیره. ضمنا هاست من اختصاصی نیست که وارد mail enable بشم.
من صفحه ای با ASP.NET و VB.NET دارم که توش باید یه پیغامی رو ایمیل بکنم. تا دو دقیقه پیش کار می کرد اما الان همون صفحه بدون هیچ تغییری کار نمی کنه در حالیکه همه authentication ها درستن. اینم کدهای من و ایرادی که سیستم میگیره. ضمنا هاست من اختصاصی نیست که وارد mail enable بشم.
PHP:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpException: Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.
Source Error:
Line 186: Dim smessage As New SmtpClient("mail.domain.com")
Line 187: smessage.Credentials = New Net.NetworkCredential([email protected], "pass")
Line 188: smessage.Send(message)
Line 189: message.Dispose()
Dim message As New MailMessage
message.To.Add(txtemail.Text)
message.From = New MailAddress("[email protected]")
message.Subject = "Subject"
message.IsBodyHtml = True
message.Body = "Body"
Dim smessage As New SmtpClient("mail.domain.com")
smessage.Credentials = New Net.NetworkCredential("[email protected]", "password")
smessage.Send(message)
message.Dispose()