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