Topic: how to send mail via gmail?

hi all.

I am using punbb-1.2.14 now, and the host verder doesn't provide local smtp server.
I wrote the gmail smtp server information in the 'Options' board, but it said gmail need 'STARTTLS'.

Smartys said 'With SSL configured it's a one-line change to get SMTP with gmail working', but how can i do?
Does anyone had hacked the 'email.php' file?

Thanks. smile

Last edited by Bibby (2006-12-22 03:21:47)

Re: how to send mail via gmail?

Assuming your version of PHP has SSL compiled in it...
FIND

if (!($socket = fsockopen($smtp_host, $smtp_port, $errno, $errstr, 15)))

CHANGE TO

if (!($socket = fsockopen('ssl://'.$smtp_host, $smtp_port, $errno, $errstr, 15)))

Now, tell me if that doesn't work and I'll look into it more: I remember that topic but not specifically what the one line change was (I think it was something like this)

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: how to send mail via gmail?

Thanks smartys, i will try it asap.

Re: how to send mail via gmail?

Smartys your solution works perfectly, but is important to remember that secure SMTP works at 465, then you must put stmp.gmail.com:465 in the server field. yikes

Re: how to send mail via gmail?

I send mail through its ID which is made on the gmail.