Hello, everybody,
I tried to send Email out using ASP.NET, but failed, here is the code of sending:
--------------------------------------------------------------------------------
Try
Try
'SmtpMail.SmtpServer = "smtp.citiz.net"
SmtpMail.Send(msg)
Catch ehttp As System.Web.HttpException
lstError.Items.Add(ehttp.Message)
lstError.Items.Add("Here is the full error message")
lstError.Items.Add(ehttp.ToString())
txtError.Text = "["+SmtpMail.SmtpServer + "]" + ehttp.ToString()
End Try
Catch eSystem As System.Exception
' 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.ToString())
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\mailroot\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.Smtpserver, 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