Hello, everybody,
I tried to send Email out using ASP.NET, but failed, here is the code of sending:
--------------------------------------------------------------------------------
Try
Try
'SmtpMail.SmtpS erver = "smtp.citiz.net "
SmtpMail.Send(m sg)
Catch ehttp As System.Web.Http Exception
lstError.Items. Add(ehttp.Messa ge)
lstError.Items. Add("Here is the full error message")
lstError.Items. Add(ehttp.ToStr ing())
txtError.Text = "["+SmtpMail.Smtp Server + "]" + ehttp.ToString( )
End Try
Catch eSystem As System.Exceptio n
' Display text of unknown error.
lstError.Items. Add("Unknown Exception occurred 0" + eSystem.Message )
lstError.Items. Add("Here is the Full Error Message")
lstError.Items. Add(eSystem.ToS tring())
End Try
--------------------------------------------------------------------------------
I've two questions:
the first is , if I open local SMTP service provided with my OS: Win 2000 professional, the code above gives me nothing, only put the mail message in the directory C:\Inetpub\mail root\Queue, so when will it be sent out ? do i need something else to be configured ?
the second is , if I choose the outside SMTP server , assign the value to Smtpmail.Smtpse rver, where can I set the authentication information ? as you know, nearly all the SMTP server now ask you to use Authentication . I cannot find the result .
whether you can give me the answer or not, I should say Thanks to everybody who take a look at this mail.
Edward , CHINA