Sending Mail through ASP.NET
-
Hi Gurus, Can any body send me the code of sending Mail through ASP.NET and wht are the requirements for sending a mail. Which Namespace we should import. Using System.Net.Mail Or Using System.Web.Mail Can any one help me out of this Plzzzzzzzz. Plz send me the code Expecting an Early and favourable Reply Thanks in Advance
with thanks and regards, kaushik pulpa
-
Hi Gurus, Can any body send me the code of sending Mail through ASP.NET and wht are the requirements for sending a mail. Which Namespace we should import. Using System.Net.Mail Or Using System.Web.Mail Can any one help me out of this Plzzzzzzzz. Plz send me the code Expecting an Early and favourable Reply Thanks in Advance
with thanks and regards, kaushik pulpa
Hi chk this http://www.codeproject.com/useritems/Email_Sending_Programme.asp[^] http://www.sitepoint.com/article/sending-web-email-asp-net[^] System.Web.Mail Keerthi
-
Hi Gurus, Can any body send me the code of sending Mail through ASP.NET and wht are the requirements for sending a mail. Which Namespace we should import. Using System.Net.Mail Or Using System.Web.Mail Can any one help me out of this Plzzzzzzzz. Plz send me the code Expecting an Early and favourable Reply Thanks in Advance
with thanks and regards, kaushik pulpa
-
Hi Gurus, Can any body send me the code of sending Mail through ASP.NET and wht are the requirements for sending a mail. Which Namespace we should import. Using System.Net.Mail Or Using System.Web.Mail Can any one help me out of this Plzzzzzzzz. Plz send me the code Expecting an Early and favourable Reply Thanks in Advance
with thanks and regards, kaushik pulpa
Hi, using System.Net.Mail; static string HostName = System.Net.Dns.GetHostName(); System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add("mrk_hari@yahoo.com"); message.Subject = "This is the Subject line"; message.From = new System.Net.Mail.MailAddress("shkuricheti@gmail.com"); message.Body = "This is the message body"; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(HostName); smtp.Send(message); Sandeep Kumar.V
-
Hi Gurus, Can any body send me the code of sending Mail through ASP.NET and wht are the requirements for sending a mail. Which Namespace we should import. Using System.Net.Mail Or Using System.Web.Mail Can any one help me out of this Plzzzzzzzz. Plz send me the code Expecting an Early and favourable Reply Thanks in Advance
with thanks and regards, kaushik pulpa
the reply from sandeep works fine
-
Hi Gurus, Can any body send me the code of sending Mail through ASP.NET and wht are the requirements for sending a mail. Which Namespace we should import. Using System.Net.Mail Or Using System.Web.Mail Can any one help me out of this Plzzzzzzzz. Plz send me the code Expecting an Early and favourable Reply Thanks in Advance
with thanks and regards, kaushik pulpa
here is that what you are looking for? Sometimes links are good, but thats my biggest problem with alot of people on CodeProject, most of us are smart enough to google, and if I come here, its because chances are I didnt understand what they were explaining out there. It helps to see real life code, so here is an example for you from one of my projects.
private void SendEmail() { try { //create email message MailMessage newMail = new MailMessage(); newMail.From="e-mail@e-mail.com"; newMail.From="e-mail@e-mail.com"; newMail.To=lblEmail.Text; newMail.Subject="Your TCAIMS Password"; newMail.Body="Your password is "+lblPassword.Text+"."; SmtpMail.SmtpServer="SMTP IP ADDRESS HERE"; SmtpMail.Send(newMail); newMail = new MailMessage(); newMail.From="e-mail@e-mail.com"; newMail.To=lblEmail.Text; newMail.Subject="Your User ID"; newMail.Body="Your User ID is "+lblUserID.Text+"."; SmtpMail.SmtpServer="SMTP SERVER IP"; SmtpMail.Send(newMail); } catch(Exception err) { string s = err.Message; HandleErrors(s); } }