Hi, I am trying to work out how a user can email me from my site by clicking a button on a web page. I am using the code below which I got from here - http://www.systemnetmail.com/faq/3.1.1.aspx . My Winhost email is enabled and I set a timezone and now have the postmaster@ detail. Is there a Winhost specific smtp client reference that I need or do I need to adjust anything else with the settings in my Winhost email ? I would be very grateful if anyone would point me in the right direction. Code: using System.Net.Mail; protected void Button6_Click(object sender, EventArgs e) { //create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress("[email protected]"); mail.To.Add("[email protected]"); //set the content mail.Subject = "This is an email"; mail.Body = "this is sample body text"; //send the message SmtpClient smtp = new SmtpClient("127.0.0.1"); smtp.Send(mail); }
Try looking at this kb article. It gives an example code on how to send email through our email server. http://support.Winhost.com/KB/a650/how-to-send-email-in-aspnet.aspx
Cheers for that Ray - all working with a new email account. Can you tell me how to find the postmasters password?
If you do not remember your postmaster password you can reset it. Log into your Winhost control panel and click on the tab marked Sites. From there you should be able to navigate to your Site Info Manager. That is where you will see a number of different buttons and you will find the button Email. Click on that to access your email manager. You will also see a link in email manager that reads SmarterMail Manager. Click on that and it will automatically open a window and log you into smartermail's web mail interface. From there, click on Settings/Accounts and you can update or reset the password to your postmaster account. Remember, the link SmarterMail Manager in your control panel will only log you into the postmaster account. If you have different POP accounts you will need to manually call on them by typing your mail domain name (as an example; mail.domain.com) and log into the desired POP account. You may want to look at this kb article. http://support.Winhost.com/KB/a551/getting-started-with-the-smartermail-email-system.aspx