Page 1 of 1

tSmtp() with gmail

PostPosted: Tue Jul 14, 2009 1:42 pm
by Willy
Hello,

I use the following code
Code: Select all  Expand view

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

Re: tSmtp() with gmail

PostPosted: Tue Jul 14, 2009 5:40 pm
by SylRob
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

Re: tSmtp() with gmail

PostPosted: Wed Jul 15, 2009 12:07 am
by James Bott

Re: tSmtp() with gmail

PostPosted: Wed Jul 15, 2009 6:02 pm
by Willy
Thanks,

This works properly.

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

Greetings

Willy