Hi,
I am working with drupal 8 beta 15.
I used this module to send mail trough smtp.gmail.com
I use tls port 587
I also used the MailSystem module to set the mailsystem to smtp.
Works excellent !!
I upgraded from php 5.5 to php 5.6 and then this module stopped working.
I tried to duplicate by writing my own php script using PHPMailer.
The issue was the same there, but there I could create a workaround by adding the following code :
$mail->smtpConnect([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
]);
How can I implement this in Your module ?
Regards,
Hans Nieuwenhuis
Comment | File | Size | Author |
---|---|---|---|
#12 | smtp-ssl-context-options-2566561-12-d7.patch.patch | 9.39 KB | Parin |
Comments
Comment #2
jhmnieuwenhuis CreditAttribution: jhmnieuwenhuis commentedI solved this issue.
I edited the php script SMTP.php and added a few lines :
Comment #3
ptmkenny CreditAttribution: ptmkenny commented@jhmnieuwenhuis Could you please contribute this as a patch so that it can be tested against the automated tests?
Comment #4
Pisco CreditAttribution: Pisco commentedI created a patch from the above comment as it solved the issue for me.
Comment #7
Pisco CreditAttribution: Pisco as a volunteer commentedI believe this error applies to version 7.x-1.x
Comment #8
Pisco CreditAttribution: Pisco as a volunteer commentedThe tests passed for version 7.x-1.x and I'd appreciate if someone could confirm so that I can set the status to RTBC.
Comment #9
vesnadrupal CreditAttribution: vesnadrupal commentedThis patch is not working on my side...
Comment #10
BD3 CreditAttribution: BD3 commented+1 Working for me great on two separate sites on separate servers.
Comment #11
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedIs this more of a workaround.
SSL certs are not being validated.
Comment #12
Parin CreditAttribution: Parin commentedI believe we should at least provide some SSL context options for end users instead of simply disabling those cert checks on behalf of them.
Comment #14
Parin CreditAttribution: Parin commentedMark as Needs Review
Comment #15
Vollzeitaffe CreditAttribution: Vollzeitaffe as a volunteer commentedParin's last patch worked for me. But now I dont need it anymore :D
The error made me realize that my mailserver (letsencrypt) wasnt serving the fullchain.pem.
Now everything works like a charm - certs get verified as they should. Since letsencrypt is giving certs out for free nobody needs no self signed certs dispite issueing certs for *.example.com (catchall)
cheers!
Comment #16
NWOM CreditAttribution: NWOM commented#12 applied cleanly and fixed my periodic issue. Thank you!
Comment #17
NWOM CreditAttribution: NWOM commentedComment #18
NWOM CreditAttribution: NWOM commentedActually it appears the periodic issue is still there even after disabling the following:
The following error was shown and the e-mail was not sent:
Warning: stream_socket_enable_crypto(): SSL: Handshake timed out in SMTP->StartTLS() (line 232 of /var/aegir/platforms/panopoly-7.x-1.43/sites/SITE/modules/smtp/smtp.transport.inc).
After waiting a moment, and trying again, the e-mail is sent with success.
Comment #19
skylord CreditAttribution: skylord commentedPatch from #12 works like a charm and provide flexibility needed to support internal company mail servers. "Handshake timed out" mentioned in #18 is definitely separate issue as i think and is not related directly to certificate issues (maybe we need separate setting for specifying handshake timeout).
Comment #20
rpayanmI can confirm that it works!
After commit this path we should bring it to version 8.x
Comment #21
peraltamori CreditAttribution: peraltamori as a volunteer and commentedPatch from #12 works
Comment #22
dsrikanth CreditAttribution: dsrikanth commentedI can confirm this patch is working.
Comment #23
kruser CreditAttribution: kruser commented12 fixed it for me too.
Comment #24
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #25
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #27
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commented