Private Sub SendMail
'always dim and initialize the MailComposer before you use it
Dim mailc As MailComposer
mailc.Initialize("mailc")
mailc.SetToRecipients(Array("[email protected]", "[email protected]"))
mailc.SetSubject("This is the subject")
mailc.SetBody("This is the <b>body</b>.", True)
'create a file and add it as an attachment
File.WriteString(File.DirTemp, "1.txt", "hello world")
mailc.AddAttachment(File.DirTemp, "1.txt", "text/plain")
mailc.Show(Page1)
End Sub