Windows Develop Bookmark and Share   
 index > Windows Forms General > Error While Sending Mail From ASP>NET
 

Error While Sending Mail From ASP>NET

i have created a form and each and every thig is ok.when i am sending message then a runtime error occured So Please Help me.

Code Looks Like this:

MailMessage msg = new MailMessage();

msg.To.Add("my email address");

msg.From = new MailAddress(txtEmail.Text);

msg.Subject = "Webhosting Enquiry From " + txtName.Text + " " + txtLastName.Text ;

msg.Body = "Name: " + txtName.Text + " " + txtLastName.Text + "\nCompany: " + txtCompany.Text + "\nCountry: " + txtCountry.Text + "\nPhone No.: " + txtPhone.Text + "\nDescription:\n" + txtDescription.Text;

SmtpClient email = new SmtpClient("smtp.hosting_company.com");

email.Send(msg);

Error:

The server rejected the sender address. The server response was: 530 5.7.0 Must issue a STARTTLS command first k24sm3179530waf.

Thank's in Advance for Support.

Manoj Sahu  Saturday, December 01, 2007 11:34 AM

Hi there,

Unfortunately the ASP.NET SMTP mail doesnt support TLS. You have a couple options:

1. Use a different hosting company or ask if they have a different option (thats not secure or authenticated)

2. Configure SMTP on your IIS server and send out that way.

Good luck

Georg Thomas  Saturday, December 01, 2007 11:50 AM

Hi there,

Unfortunately the ASP.NET SMTP mail doesnt support TLS. You have a couple options:

1. Use a different hosting company or ask if they have a different option (thats not secure or authenticated)

2. Configure SMTP on your IIS server and send out that way.

Good luck

Georg Thomas  Saturday, December 01, 2007 11:50 AM
I am using the built in object System.Web.Mail.MailMessage and am receiving the same error- Will enabling SSL and secure communication encrypt my SMTP traffic?
xTMFWahoo  Thursday, December 20, 2007 2:18 PM

You can use google to search for other answers

Custom Search

More Threads

• FolderBrowserDialog to select machines on network.
• Passing data from one form to the next??
• realtime Listbox items
• Unhandled exception using webBrowser
• Why does Application.DoEvents reset the SynchronizationContext?
• Re: modal form will not close
• Parent - Child windows
• What about Application Forms ??
• richTextBox, simple visual problem.
• Rogue browser control - AxSHDocVw in Windows Forms App