Website Design United States, Website Design California, Website Designing United States, Website Designing California

How to Send an email using SMTP (C#)

Sending Email is easy. The only conditions is that you have to have access to an SMTP mailing service.
  using System.Web.Mail;

  ...

  public static void SendF4Mail(string in_Body, string in_Subject, _
                              string in_From, string in_To, string in_Bcc)
  {
    MailMessage lv_Mail = new MailMessage();
    string lv_MySMTPServer = "smtp.xxxxx.xxxx";  //Your SMTP server

    lv_Mail.To = in_To;  //Valid Emailadres
    lv_Mail.Bcc = in_Bcc;  //Valid Emailadres
    lv_Mail.Subject = in_Subject;
    lv_Mail.From = in_From;  //Valid Emailadres (that is allowed to relay).
    lv_Mail.Body = in_Body;
    lv_Mail.Priority = MailPriority.Normal;
    lv_Mail.BodyFormat = MailFormat.Html;  //or MailFormat.Text
    SmtpMail.SmtpServer.Insert(0,lv_MySMTPServer);
    SmtpMail.Send(lv_Mail);  //Send the email
  }



    Enquiry
 






    Contact us
340 W, 26th Street, Suite F, National City, California - 91950 United States
Tel : 818-667-2853
Info@webbgirrl.com

















 

 

 

 

 

 

 

 

 

 

Ajax Technologies | Foodgear Shop| Lowest Unique Bid Auction | Our Team | Terms And Condition | What is encapsulation | MustInherit class with parameters in the constructor | How to extract src from img elements in html code | How to extract url and anchor from html content | Grab the content of a webpage using C | How to extract the host name from an url C| How to send an email using smtp C | How to remove html tags from web content C | How to convert date time to sql valid string | Set row color in datagrif web from | Disclaimer | How to refresh the data in an xml reader object | Aprendiendo ms access 2000 en 24 horas | Microsoft visual C++ net step by step | Possible to disable a row in listview | Designing sql server 2000 databases for net enterprise | Biztalk server 2000 developer guide for net
© 2008-2009 webbgirrl.com