XF 2.2 Email Transport Method (SMTP) not working

TheGroove

Well-known member
I've been troubleshooting this issue for a couple of days back and forth with moosend now and it looks like it's something with Xenforo.

When I test with moosend on SMTPer it successfully sends:
Greenshot 2022-03-21 07.02.03.webp

But when I attempt through Xenforo I get errors
Greenshot 2022-03-21 07.05.06.webp

Here is the error, I've tried several combinations with SSL and TLS but all throw errors when I attempt here.
++ Starting XF\Mail\SmtpTransport
<< 220 Moosend SMTP Service

> EHLO sitename.com

<< 250-PLSD007
250-PIPELINING
250-SIZE 550000000
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-DSN
250 AUTH PLAIN LOGIN

> STARTTLS

<< 220 Ready to start TLS.

> EHLO sitename.com

<< 250-PLSD007
250-PIPELINING
250-SIZE 550000000
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-DSN
250 AUTH PLAIN LOGIN

> AUTH LOGIN

<< 334 VXNlck5hbWU6

> ZXJpYy5uLnRodXJiZXJAZ21haWwuY29t

<< 334 UGFzc3dvcmQ6

> I3ZARSpKalpNc2U0R1BV

<< 235 2.7.0 Authentication succeeded.

++ XF\Mail\SmtpTransport started
> MAIL FROM:<email address>

> RCPT TO:<email address>


<< 250 OK.

<< 250 OK.

<< 354 Start mail input; end with <CRLF>.<CRLF>

.

<< 451 Object reference not set to an instance of an object.

!! Expected response code 250 but got code "451", with message "451 Object reference not set to an instance of an object.
" (code: 451)
!! Expected response code 250 but got code "451", with message "451 Object reference not set to an instance of an object.
"
Log data:
++ Starting XF\Mail\SmtpTransport
<< 220 Moosend SMTP Service

> EHLO sitenamecom

<< 250-PLSD007
250-PIPELINING
250-SIZE 550000000
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-DSN
250 AUTH PLAIN LOGIN

> STARTTLS

<< 220 Ready to start TLS.

> EHLO sitename.com

<< 250-PLSD007
250-PIPELINING
250-SIZE 550000000
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-DSN
250 AUTH PLAIN LOGIN

> AUTH LOGIN

<< 334 VXNlck5hbWU6

> ZXJpYy5uLnRodXJiZXJAZ21haWwuY29t

<< 334 UGFzc3dvcmQ6

> I3ZARSpKalpNc2U0R1BV

<< 235 2.7.0 Authentication succeeded.

++ XF\Mail\SmtpTransport started
> MAIL FROM:<email>

> RCPT TO:<email>


<< 250 OK.

<< 250 OK.

<< 354 Start mail input; end with <CRLF>.<CRLF>

.

<< 451 Object reference not set to an instance of an object.

!! Expected response code 250 but got code "451", with message "451 Object reference not set to an instance of an object.
" (code: 451) (code: 451)
++ Stopping XF\Mail\SmtpTransport

<< 221 <PLSD007> Service closing transmission channel.

++ XF\Mail\SmtpTransport stopped
 
Wondering if @Chris D or one of the other board devs may have an idea about this, I'm basically at an impasse. I've worked with both Knownhost and the SMTP relay provider. We are able to successfully send SMTP emails through both SMTPer and with telnet directly from our server without incident. However, when attempting through Xenforo none of us can get it to work.

The main error we receive is:
"451", with message "451 Object reference not set to an instance of an object.

Any assistance I can get here would be great, this has been haunting my board for months causing issues with new registrations and notifications.

here is a stack trace with more info:

Server error log
  • Swift_TransportException: Email to user@email.com failed: Expected response code 250 but got code "451", with message "451 Object reference not set to an instance of an object. "
  • src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:459

Stack trace

#0 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(344): Swift_Transport_AbstractSmtpTransport->assertResponseCode('451 Object refe...', Array)
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(305): Swift_Transport_AbstractSmtpTransport->executeCommand('
.
', Array, Array, false, NULL)
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(406): Swift_Transport_EsmtpTransport->executeCommand('
.
', Array)
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(502): Swift_Transport_AbstractSmtpTransport->streamMessage(Object(Swift_Message))
#4 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(518): Swift_Transport_AbstractSmtpTransport->doMailTransaction(Object(Swift_Message), 'ericgtr@icloud....', Array, Array)
#5 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(206): Swift_Transport_AbstractSmtpTransport->sendTo(Object(Swift_Message), 'ericgtr@icloud....', Array, Array)
#6 src/XF/Mail/Mailer.php(306): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#7 src/XF/Mail/Queue.php(148): XF\Mail\Mailer->send(Object(Swift_Message), Object(XF\Mail\SmtpTransport), Array)
#8 src/XF/Job/MailQueue.php(12): XF\Mail\Queue->run(7.99113)
#9 src/XF/Job/Manager.php(260): XF\Job\MailQueue->run(7.99113)
#10 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.99113)
#11 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.99113)
#12 job.php(43): XF\Job\Manager->runQueue(false, 8)
#13 {main}

Request state

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(24) "https://talkedabout.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Additionally, I have a second board and get the same results there.
 
Top Bottom