Overview
Previous  Next

DesktopMailMessage and SMTP objects allow you to send email messages using a SMTP server.

Example:
'SMTP is a SMTP object and Msg is a DesktopMailMessage

Sub Globals
End Sub

Sub App_Start
      Form1.Show
      SMTP.New1("host",587,"username","password")
      Msg.New1
      Msg.AddTo("[email protected],[email protected]")
      Msg.Subject = "Important mail"
      Msg.Body = "Hi," & crlf & "How are you doing?"
      Msg.AddAttachment(AppPath & "\SomeDocument.doc")
      Msg.From = "[email protected]"
      SMTP.Send(Msg.Value)
      Msgbox("Message was sent.")
End Sub