View Single Post
  #2 (permalink)  
Old February 13th, 2006, 08:19 AM
jitendersingal jitendersingal is offline
Authorized User
 
Join Date: Feb 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 Dim Mail As New MailMessage
        Dim Msmtp As SmtpMail
        Mail.Priority = MailPriority.Normal
        Mail.To = LblTo.Text
        Mail.From = LblFrom.Text
        Mail.Bcc = LblBcc.Text
        Mail.Subject = TxtSubject.Text.Trim.ToString
        Mail.BodyFormat = MailFormat.Html
        Mail.Body = TxtMsg.Text.Trim.ToString
        Mail.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "Your smtp server name"
        Mail.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
        Mail.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        Mail.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
        Mail.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Username"
        Mail.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Password"
Msmtp.Send(Mail)

hope this will help u