Wednesday, March 28, 2012

Visual Basic Tutorial ( Send Fake Email with attachment ) [ 1 ]





Download Visual Basic:
http://www.microsoft.com/visualstudio/en-us 



Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body."
Dim attachment As New MailAttachment(Server.MapPath("test.txt")) 'create the attachment
mail.Attachments.Add(attachment) 'add the attachment
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)

No comments:

Post a Comment