TSMTP Class with HTML

TSMTP Class with HTML

Postby Ollie » 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:

Code: Select all  Expand view
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
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 82 guests