You are on page 1of 1

imports system.web.

mail
try
dim insmail as new mailmessage()
with insmail
.from = "omar.abid2006@gmail.com"
.to = "omar.abid2006@gmail.com"
.subject = "test"
.body = "test sending email"
end with
smtpmail.smtpserver = "your smtp server"
smtpmail.send(insmail)
console.writeline("successfully sent email message" + vbcrlf)
catch err as exception
console.writeline("exception " + err.message + vbcrlf)
end try

You might also like