XF 2.3 Emails not sending since sunday - didnt touch anything

vmedia

Member
getting this error:
  • Symfony\Component\Mailer\Exception\TransportException: Email to support@xxxx.com from rxxxxy@gmail.com failed: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
  • src/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:171


i get this whenever i send email using contact form.

using smtp.sendgrid.net
port 587

SSL is not enabled (no checkmark)


again it was working fine and randomly giving errors now? anyone know how to fix? i did update my php but that was a week or so ago, not sunday. saw this fix here:https://stackoverflow.com/questions...able-to-connect-with-starttls-stream-socket-e not sure if we have an env file though??
 
If you're getting messages about SSL operations failing, you should probably try enabling "Use SSL/TLS"

It could be that something has changed at the SendGrid end which is causing this to fail now. Or it could be an operating system level change.
 
That doesnt fix it either. I tried using ssl and using the ssl port for sendgrid.

here is the full output:

#0 [internal function]: Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream->Symfony\Component\Mailer\Transport\Smtp\Stream\{closure}(2, 'stream_socket_e...', '/home/xxxx...', 174)
#1 src/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php(174): stream_socket_enable_crypto(Resource id #176, true)
#2 src/vendor/symfony/mailer/Transport/Smtp/EsmtpTransport.php(115): Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream->startTLS()
#3 src/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(253): Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport->doHeloCommand()
#4 src/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(194): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->start()
#5 src/vendor/symfony/mailer/Transport/AbstractTransport.php(72): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->doSend(Object(Symfony\Component\Mailer\SentMessage))
#6 src/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(136): Symfony\Component\Mailer\Transport\AbstractTransport->send(Object(Symfony\Component\Mailer\SentMessage), Object(Symfony\Component\Mailer\DelayedEnvelope))
#7 src/XF/Mail/Mailer.php(305): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->send(Object(Symfony\Component\Mime\Email))
#8 src/XF/Mail/Mail.php(576): XF\Mail\Mailer->send(Object(Symfony\Component\Mime\Email), Object(Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport))
#9 src/XF/Admin/Controller/ToolsController.php(310): XF\Mail\Mail->send(Object(Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport), false)
#10 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionTestEmail(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'TestEmail', Object(XF\Mvc\RouteMatch), Object(Hampel\WhatsNewDigest\XF\Admin\Controller\Tools), NULL)
#12 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Hampel\WhatsNewDigest\XF\Admin\Controller\Tools), NULL)
#13 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 admin.php(15): XF::runApp('XF\\Admin\\App')
#17 {main}
 
tls_process_server_certificate:certificate verify failed
Based on the information provided -- you said it suddenly stopped working, which indicates a possible expiration of a CA (root) file or specific certificate somewhere. (using the above error as clue). I'd also check to make sure your system clock is correct as that can generate the same error in some instances.

(it's not going to be an XF problem regardless, so I wouldn't bother tinkering with XF settings -- just leave them as is if it was working before)

Edit: Don't know what OS you are running, but you can try to reinstall your ca-certificates package.
 
Last edited:
Based on the information provided -- you said it suddenly stopped working, which indicates a possible expiration of a CA (root) file or specific certificate somewhere. (using the above error as clue). I'd also check to make sure your system clock is correct as that can generate the same error in some instances.

(it's not going to an XF problem regardless, so I wouldn't bother tinkering with XF settings -- just leave them as is if it was working before)
hmm yes thats what im thinking too - but im using cloudflare ssl. and using smtp of sendgrid. and hosting on a cpanel whm. with this setup what CA certificate would it be referring to? surely not the local one on my server right? should be on cloudflares side? im not that advanced to know which ca certificate it refers to.
 
hmm yes thats what im thinking too - but im using cloudflare ssl. and using smtp of sendgrid. and hosting on a cpanel whm. with this setup what CA certificate would it be referring to? surely not the local one on my server right? should be on cloudflares side? im not that advanced to know which ca certificate it refers to.
It's an OS level package, see my edit above.
Cpanel, honestly don't have any recent experience with those managed hosting systems -- so I may be barking up the wrong tree here.
 
Back
Top Bottom