09-10-16, 12:43 PM
Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient("smtp.hotmail.com")
mail.From = New MailAddress("samira.aa70@hotmail.com")
mail.[To].Add("nouring@gmail.com")
mail.Subject = "Test Mail - 1"
mail.Body = "mail with attachment"
Dim attachment As System.Net.Mail.Attachment
attachment = New System.Net.Mail.Attachment("C:\Books.mdb")
mail.Attachments.Add(attachment)
SmtpServer.Port = 587
SmtpServer.Credentials = New System.Net.NetworkCredential("", "")
SmtpServer.EnableSsl = True
SmtpServer.Send(mail)
MessageBox.Show("mail Send")
Dim SmtpServer As New SmtpClient("smtp.hotmail.com")
mail.From = New MailAddress("samira.aa70@hotmail.com")
mail.[To].Add("nouring@gmail.com")
mail.Subject = "Test Mail - 1"
mail.Body = "mail with attachment"
Dim attachment As System.Net.Mail.Attachment
attachment = New System.Net.Mail.Attachment("C:\Books.mdb")
mail.Attachments.Add(attachment)
SmtpServer.Port = 587
SmtpServer.Credentials = New System.Net.NetworkCredential("", "")
SmtpServer.EnableSsl = True
SmtpServer.Send(mail)
MessageBox.Show("mail Send")
اللهم لا علم لنا إلا ما علمتنا
http://www.facebook.com/samira.abdalla.980
http://www.facebook.com/samira.abdalla.980
