objEmail = Createobject("CDO.Message") objEmail.From = Trim(Substr(Sys(0),1,At("#",Sys(0))-1))+"@coloil.com.br" objEmail.To = "x@x.com" objEmail.Subject = "teste" objEmail.AddAttachment("c:\test.txt") objEmail.Send Release objEmail- Using Outlook express : MAPI
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fox7help/html/samSend_Mail.asp http://msdn.microsoft.com/library/?url=/library/en-us/mapi/html/_mapi1book_legal_information_2.asp?frame=true
With thisform .oleSession.Signon .oleMessage.SessionID = .oleSession.SessionID .oleMessage.Compose .oleMessage.RecipIndex = 0 .oleMessage.RecipDisplayName = "x@x.com" .oleMessage.ResolveName .oleMessage.MsgSubject = 'test' .oleMessage.AttachmentIndex = 0 .oleMessage.AttachmentPathName = "test.htm" .oleMessage.Send(0) .oleSession.Signoff Endwith- using others control