VB.Net/Network Remote/Email

Материал из VB Эксперт
Перейти к: навигация, поиск

Send an Email out

Imports System.Web.Mail
Module Module1
    Sub Main()
        Dim Smtp As SmtpMail
        Smtp.SmtpServer = "Put Your STMP Server Address Here"
        Dim Msg As MailMessage = New MailMessage()
        Msg.Body = "Demo message from a program"
        Msg.From = "fromEmail@SomeSite.ru"
        Msg.To = "toEMail@SomeSite.ru"
        Msg.Subject = "Demo Message"
        Smtp.Send(Msg)
    End Sub
End Module