FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour tSmtp() with gmail
Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
tSmtp() with gmail
Posted: Tue Jul 14, 2009 01:42 PM
Hello,

I use the following code
Code (fw): Select all Collapse
function SendMail()
   local oOutMail, cIP


   WSAStartup()
   oOutMail := TSmtp():New( cIP := GetHostByName( "smtp.gmail.com",465) )
   MsgInfo( cIP )

   oOutMail:bConnecting = { ||nil }
   oOutMail:bConnected  = { ||nil  }
   oOutMail:bDone       = { || MsgInfo( "Message sent successfully" ) }

   oOutMail:SendMail( "hermanswilly@gmail.com",;     // From
                      { "hermanswilly@gmail.com" },; // To
                      "Test2",;              // Msg Text
                      "Test 2",; // Subject
                      { } )  // attached files

return nil


It works fine with my standard provider.

When I want to use gmail port 465 or port 587 it does not work.

Does someone have an idea.

Thanks

Willy
Posts: 15
Joined: Thu Nov 01, 2007 04:54 PM
Re: tSmtp() with gmail
Posted: Tue Jul 14, 2009 05:40 PM

Willy,

To use SMTP Gmail you must been authenticated !. I'm not using Fivewin nor Xharbour but see how you can use SMTP authentication with Fivewin !

Quote from GMAIL setup instruction
Please note that if your client does not support SMTP authentication, you won't be able to send mail through your client using your Gmail address.

?End quote

Best,

Sylvain

Sylvain Robert
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: tSmtp() with gmail
Posted: Wed Jul 15, 2009 12:07 AM
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
Re: tSmtp() with gmail
Posted: Wed Jul 15, 2009 06:02 PM

Thanks,

This works properly.

Now the pop3 server and all mail can be managed from within FiveWin.

Greetings

Willy

Continue the discussion