![]() |
|||
Sending EMAIL through VB.Net
By: rekha singh | 29 Apr 2010 1:08 pm
Sending EMAIL through VB.Net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim email As New System.Web.Mail.MailMessage
email.To = "ABSReceiver@abc.com"
email.From = "ABcSender@abc.com"
email.Body = "Hi!!!!!! "
email.Subject = "Testing"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "1.1.1.1" 'SMTP Server IP Address
System.Web.Mail.SmtpMail.Send(email)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
System.Web.Mail.SmtpMail.SmtpServer = "1.1.1.1" 'SMTP Server IP Address
System.Web.Mail.SmtpMail.Send("ABSReceiver@abc.com", "ABcSender@abc.com", "Testing", "Hi!!!!!! ")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim a As Object
a = Shell("c:\Program Files\Outlook Express\msimn.exe", AppWinStyle.NormalFocus)
End Sub |
