Email issues #1

Closed
opened 2023-10-24 09:48:30 -04:00 by brooke · 5 comments
Owner

Issues with sending email

Expected behavior

Email gets delivered

Description

Email seems to be failing in a couple different ways, first when someone requests for verification, second for notification emails. It all seems to stem from php sendmail


FIXED, stp is now setup to use SMTP through AWS. This is a temporary fix so hopefully we can move to a better provider soon.

## Issues with sending email ### Expected behavior Email gets delivered ### Description Email seems to be failing in a couple different ways, first when someone requests for verification, second for notification emails. It all seems to stem from php sendmail --- ~~FIXED, stp is now setup to use SMTP through AWS. This is a temporary fix so hopefully we can move to a better provider soon.~~
brooke pinned this 2023-11-04 22:02:11 -04:00
brooke added the
Kind/Bug
label 2023-11-04 22:03:31 -04:00
brooke self-assigned this 2023-11-04 22:03:40 -04:00
brooke added the
Reviewed
Won't Fix
label 2023-11-04 22:09:07 -04:00
Author
Owner

Seems to be a Xenforo issue, wont be spending all that much time fixing unless there is a clear way to get it working. Prioritizing migration to discourse right now.

Seems to be a Xenforo issue, wont be spending all that much time fixing unless there is a clear way to get it working. Prioritizing migration to discourse right now.
Author
Owner
  • not a plugin issue
  • the server's IP has not been blocked
  • not an openssl or starttls issue
  • maybe Swift mailer?
- not a plugin issue - the server's IP has not been blocked - not an openssl or starttls issue - maybe [Swift mailer](https://github.com/swiftmailer/swiftmailer)?
Author
Owner

example error output:

Swift_TransportException: Email to <redacted> from feedback@squattheplanet.com failed: Connection could not be established with host email-smtp.us-east-1.amazonaws.com :stream_socket_client(): Unable to connect to tcp://email-smtp.us-east-1.amazonaws.com:465 (Operation timed out) src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:261 

One thing that looks pretty strange is that it's using tcp:// after specifying tls in the email setup settings in XF

stack trace:

0 [internal function]: Swift_Transport_StreamBuffer->{closure}(2, 'stream_socket_c...', 's...', 264)
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(264): stream_socket_client('tcp://email-smt...', 0, '', 30, 4, Resource id #188)
#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(7.96972)
#7 src/XF/Job/Manager.php(260): XF\Job\MailQueue->run(7.96972)
#8 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.96972)
#9 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.96972)
#10 job.php(43): XF\Job\Manager->runQueue(false, 8)
#11 {main}
### example error output: ``` Swift_TransportException: Email to <redacted> from feedback@squattheplanet.com failed: Connection could not be established with host email-smtp.us-east-1.amazonaws.com :stream_socket_client(): Unable to connect to tcp://email-smtp.us-east-1.amazonaws.com:465 (Operation timed out) src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:261 ``` One thing that looks pretty strange is that it's using tcp:// after specifying tls in the email setup settings in XF ### stack trace: ``` 0 [internal function]: Swift_Transport_StreamBuffer->{closure}(2, 'stream_socket_c...', 's...', 264) #1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(264): stream_socket_client('tcp://email-smt...', 0, '', 30, 4, Resource id #188) #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(7.96972) #7 src/XF/Job/Manager.php(260): XF\Job\MailQueue->run(7.96972) #8 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.96972) #9 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.96972) #10 job.php(43): XF\Job\Manager->runQueue(false, 8) #11 {main} ```
Author
Owner

Using Swaks I can connect to AWS successfully and there seems to be no issues with SSL or TLS on the server which leads me to believe it is a SwiftMail issue

Ref: https://swiftmailer.symfony.com/docs/introduction.html

Swift Mailer: A feature-rich PHP Mailer

Swift Mailer is a component based library for sending e-mails from PHP applications.

Swift Mailer will stop being maintained at the end of November 2021.

Please, move to Symfony Mailer at your earliest convenience. Symfony Mailer is the next evolution of Swift Mailer. It provides the same features with support for modern PHP code and support for third-party providers.

Using Swaks I can connect to AWS successfully and there seems to be no issues with SSL or TLS on the server which leads me to believe it is a SwiftMail issue Ref: https://swiftmailer.symfony.com/docs/introduction.html > ## Swift Mailer: A feature-rich PHP Mailer > > Swift Mailer is a component based library for sending e-mails from PHP applications. > > **Swift Mailer will stop being maintained at the end of November 2021.** > > Please, move to Symfony Mailer at your earliest convenience. Symfony Mailer is the next evolution of Swift Mailer. It provides the same features with support for modern PHP code and support for third-party providers.
brooke added
Reviewed
Confirmed
and removed
Reviewed
Won't Fix
labels 2023-11-12 15:09:28 -05:00
Author
Owner

Seemed to actually be unrelated to Swift Mailer, after updating openssl and fixing the docker iptables issue everything is working again

Seemed to actually be unrelated to Swift Mailer, after updating openssl and fixing the docker iptables issue everything is working again
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stp/forum#1
No description provided.