Closed (fixed)
Project:
SMTP Authentication Support
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Reporter:
Created:
28 Nov 2005 at 11:55 UTC
Updated:
31 Jan 2007 at 05:47 UTC
Jump to comment: Most recent file
Comments
Comment #1
LukeLast commentedThat sounds cool to me, do you know of any resources to start from?
Comment #2
LukeLast commentedI would not be able to do this myself so unless someone can get the ball rolling I'll close the issue.
Comment #3
EmanueleQuinto commentedNot only the amount of non-SSL smtp servers is shrinking fast, but GMail is asking SSL authentication (on port 465 currently) as stated in Configuring other mail clients.
So if someone is using Google Apps for Your Domain and need to use SMTP there is a possible solution.
First of all you have to check if ssl is enabled in your php configuration (look on php.ini or run phpinfo).
Then use attached patch. What it does?
Following a suggestion on phpmailer forum all that we need it's adding a protocol specification on fsockopen $host parameter. Instead of smtp.gmail.com we need to open ssl://smtp.gmail.com
So basically the patch change on SMTP
function Connect($host,$port=0,$tval=30)to
Other small changes add parameter management (editing on drupal, adding on class definitions etc.).
Seems to work on drupal 4.7 (if someone is interested there is also a 4.6 patch).
Comment #4
danbh commentedI got this error
warning: fgets() [function.fgets]: SSL: fatal protocol error in /var/www/drupal.hollocher.is-a-geek.com/modules/smtp/smtp.module on line 2775.
and the email did not send
Comment #5
danbh commentedI'm sorry, the email did, in fact, send! I do get that warning, but the emails are being sent. Thanks.
Comment #6
EmanueleQuinto commentedOn the forum post there is another step that I didn't include in the patch:
Anyway mail is sent.
I googled around to find another solution but I failed :-(
Comment #7
danbh commented@ doesn't work.
I saw an error report for drupal somewhere mentioning that behavior in a different context. Maybe its a drupal bug.
Regardless, it looks like I will have to live with the error, which is fine.
Thanks!
Comment #8
nrasmus commentedThis looks very promising--I do have a question though--if your php.ini has no mention of ssl, what do I do? Running php 4, do I need to recompile that?
Comment #9
nrasmus commentedJust wanted to report something here--it took me almost 2 weeks (of not constant) effort to figure this out:
Depending on where you look, google tells you to use smtp on port 465 or on 587. Turns out that 465 is ssl (not sure what version), and 587 is TLS. FYI--if you have a stable version of php4 or php5, you probably will not get this to work with TLS of 587. With 465, the error danbh reports does show up in your log, but the mails get sent. I didn't dig far enough--but this has something to do with how php can use STARTTLS.
Comment #10
LukeLast commentedThanks for all the great information.
HEAD has been updated to support SSL. It was working for me with gmail.
Comment #11
(not verified) commented