TSMTP Class with HTML
Posted: Tue May 01, 2007 4:12 pm
I am having fun with the TSMTP class. Is it possible to send an HTML email like I can with TMAIL by having no cBody and attaching an HTML file?
This isn't working:
This isn't working:
Code: Select all
function SendMail(oWnd)
local oOutMail, cIP
oWnd:SetMsg( "Sending Internet email..." )
WSAStartup()
oOutMail := TSmtp():New( cIP := GetHostByName( "smtp.saix.net" ) )
// MsgInfo( cIP )
oOutMail:bConnecting = { || oWnd:SetMsg( "Connecting to smtp.saix.net..." ) }
oOutMail:bConnected = { || oWnd:SetMsg( "Connected" ) }
oOutMail:bDone = { || oWnd:SetMsg( "Message sent successfully" ) } //else The message Sent ALERT - is automatic.
oOutMail:SendMail( "ollie@theoasis.co.za",; // From
{ "support@theoasis.co.za" },; // To
"",; // Msg Text
"Quote "+DTOC(DATE())+" "+LEFT(TIME(),5),;
{ DEFPATH() + "QUOLLIE.HTM" } )
// { "testsmtp.prg", "testsmtp.zip" } ) // attached files
return nil