tSmtp() with gmail

tSmtp() with gmail

Postby Willy » Tue Jul 14, 2009 1:42 pm

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
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Re: tSmtp() with gmail

Postby SylRob » Tue Jul 14, 2009 5: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
SylRob
 
Posts: 15
Joined: Thu Nov 01, 2007 4:54 pm

Re: tSmtp() with gmail

Postby James Bott » Wed Jul 15, 2009 12:07 am

User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: tSmtp() with gmail

Postby Willy » Wed Jul 15, 2009 6:02 pm

Thanks,

This works properly.

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

Greetings

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 152 guests