AddEmail ActiveX can be used to send emails from Visual FoxPro applications. To use AddEmail in your FoxPro project you need to add a code that creates SmtpMail object and sends a message using SimpleSend, SimpleSendAttachment or Send. Please use code snapshots below to get started.
* Create message and setup subject and body
objMailMessage = CREATEOBJECT("AddEmail.MailMessage")
objMailMessage.MessageBodyFormat = 1 && HTML format
objMailMessage.MessageSubject = "test"
objMailMessage.MessageBody = "<html><body><b>Testing...</b></body></html>"
* Send prepared message
numResultCode = objSmtpMail.Send(objMailMessage, .t., @strError)
IF numResultCode = 0 THEN MESSAGEBOX("Sent successfully!")
ELSE MESSAGEBOX(strError)
ENDIF
Please refer to the Reference section of this manual for detailed description of AddEmail objects, methods and properties.