Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 18, 2012 07:00 AM by bhushan_bharat
Member
2 Points
126 Posts
Aug 18, 2012 04:27 AM|LINK
i can able to send mail from local host,but i cant able to send mail from server.
Participant
960 Points
458 Posts
Aug 18, 2012 05:12 AM|LINK
public void sendemail() { MailMessage ms = new MailMessage(); ms.IsBodyHtml = true; string to="To Address" ms.To.Add(new MailAddress(to)); string fromaddr = "from address" ms.From = new MailAddress(fromaddr); ms.Subject = "Your Password Remainder"; string body = "content of body" ms.Body = body; ms.Priority = MailPriority.Normal; SmtpClient smtp = new SmtpClient(); smtp.Credentials = new System.Net.NetworkCredential("email Id", "password"); try { smtp.Send(ms); txtemail.Text = ""; } catch (Exception ex) { ex.ToString(); } }
164 Points
29 Posts
Aug 18, 2012 05:20 AM|LINK
You didn't specified the Code what you used for sending mail nor the Error message.
. By the way, in previous answer there is Full Code for Sending mails, Just Replace Variables and publish to Web. Then tell what is result.
1883 Points
323 Posts
Aug 18, 2012 05:30 AM|LINK
Hi, friend
Please post your code and if you got any exception messages post it to enable us helps you
1498 Points
581 Posts
Aug 18, 2012 07:00 AM|LINK
have look these links
http://usingaspdotnet.blogspot.in/2011/03/email-using-aspnet.html
http://usingaspdotnet.blogspot.in/2011/07/newsletter-in-aspnet.html
anugeorge09
Member
2 Points
126 Posts
sending mail
Aug 18, 2012 04:27 AM|LINK
i can able to send mail from local host,but i cant able to send mail from server.
narasappa
Participant
960 Points
458 Posts
Re: sending mail
Aug 18, 2012 05:12 AM|LINK
public void sendemail() { MailMessage ms = new MailMessage(); ms.IsBodyHtml = true; string to="To Address" ms.To.Add(new MailAddress(to)); string fromaddr = "from address" ms.From = new MailAddress(fromaddr); ms.Subject = "Your Password Remainder"; string body = "content of body" ms.Body = body; ms.Priority = MailPriority.Normal; SmtpClient smtp = new SmtpClient(); smtp.Credentials = new System.Net.NetworkCredential("email Id", "password"); try { smtp.Send(ms); txtemail.Text = ""; } catch (Exception ex) { ex.ToString(); } }ravi.jadiyannavar@gmail.com
Pls Mark This Post As Answer If it Helps U..
Thanku
John Bhatt
Member
164 Points
29 Posts
Re: sending mail
Aug 18, 2012 05:20 AM|LINK
You didn't specified the Code what you used for sending mail nor the Error message.
. By the way, in previous answer there is Full Code for Sending mails, Just Replace Variables and publish to Web. Then tell what is result.
Damn Code
Participant
1883 Points
323 Posts
Re: sending mail
Aug 18, 2012 05:30 AM|LINK
Hi, friend
Please post your code and if you got any exception messages post it to enable us helps you
Please remember to Mark the replies as Answers if they help & unmark them if they provide no help.
bhushan_bhar...
Participant
1498 Points
581 Posts
Re: sending mail
Aug 18, 2012 07:00 AM|LINK
have look these links
http://usingaspdotnet.blogspot.in/2011/03/email-using-aspnet.html
http://usingaspdotnet.blogspot.in/2011/07/newsletter-in-aspnet.html
Useofasp.net/
Howtouseasp.net