XF 2.2 Email Server Error

Digital Jedi

Well-known member
Swift_TransportException: Email to a*****@gmail.com from markdanielmartinez@gmail.com failed: Connection could not be established with host smtp.gmail.com :stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection refused) src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:261
Generated by: Unknown account Apr 2, 2023 at 5:49 AM
Stack trace
#0 [internal function]: Swift_Transport_StreamBuffer->{closure}(2, 'stream_socket_c...', '/home/eonpres/d...', 264)
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(264): stream_socket_client('ssl://smtp.gmai...', 0, '', 30, 4, Resource id #325)
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(58): Swift_Transport_StreamBuffer->establishSocketConnection()
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(143): Swift_Transport_StreamBuffer->initialize(Array)
#4 src/XF/Mail/Mailer.php(294): Swift_Transport_AbstractSmtpTransport->start()
#5 src/XF/Mail/Queue.php(148): XF\Mail\Mailer->send(Object(Swift_Message), Object(XF\Mail\SmtpTransport), Array)
#6 src/XF/Job/MailQueue.php(12): XF\Mail\Queue->run(6.3291)
#7 src/XF/Job/Manager.php(260): XF\Job\MailQueue->run(6.3291)
#8 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 6.3291)
#9 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 6.3291)
#10 job.php(43): XF\Job\Manager->runQueue(false, 8)
#11 {main}

Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(75) "https://www.cogonline.net/threads/levia-dragon-daedalus-vs-scapegoat.39946/"
  ["_GET"] => array(0) {
  ["_POST"] => array(0) {

So it's been a millennium since I had to set up the email side of my board, and I'm having trouble getting it to work. I keep getting this error and I'm not really sure what it means. I was initially using the PHP mailer. So I tried switching to Google OAuth. I'm pretty sure I configured it correctly. But I'm not sure if being in test mode affects it actually being used by my email address. I assumed was authorized, it would work.

I believe I finally set the DomainKey properly. Still waiting for that to check (again.) Would improper configuration of the DKIM result in the above error?


Or is it just the fact I'm using Gmail? I don't know and feel like it's been forever since I actually knew how to do this part.
Or is it just the fact I'm using Gmail? I don't know and feel like it's been forever since I actually knew how to do this part.
Wait until DKIM is finished, if the issue persists, then you might need to use app passwords.

They made life a bit more difficult to connect some time ago. So if you can't connect with oAuth2 you need app password.
Heh, I forgot I even made this thread. Yeah, I've verified the records several times, then I went through my host, then I checked and verified them again. I reconfirm and wait a couple of days, and it still doesn't update. I went ahead and switched to Google Oauth SMTP, which I am 80% sure I did correctly. But I haven't fooled with emails settings in so long, I forget what does what and if/when something affects the other thing. I'm not sure if I've done anything right.
If anyone has this issue in the future, it is likely because your server for hosting your forum has it's firewall blocking the mail server. If that's the case, whitelist your mail host's IP address(es).
Top Bottom