XF 1.1 Amazon SES With Xenforo

TheBigK

Well-known member
Yesterday, I stumbled upon Amazon SES which now has SMTP gateway. I'm planning to use it with Xenforo to handle all the emails; so that the delivery is always right. I, however have basic questions -
  • To the best of my knowledge, I only need to enter the SMTP settings provided by Amazon in 'Email Options' in XF ACP. Is that enough?
  • Can I use it to send notifications or monthly newsletter to all the members who have opted to receive emails from administrator? Would that be spamming? We've over 90k members who've opted to receive emails from admins; but my estimate is that 10-20k of them aren't active. We didn't have 'email' verification enabled in our earlier days.
Thank you for your time in advance :)
 
Not sure. The settings worked for me fine. Are you using the username & password provided by the system?
Yes, in the STMP settings, i have
Server Name: email-smtp.us-east-1.amazonaws.com
Port: 465
Use Transport Layer Security (TLS): Yes
Authentication:
Your SMTP credentials - see below.


Then I click on Create my SMTP credentials, it will ask me for IAM username. Then it will allow me to download the xls file with IAM username, STMP username, STMP password.

What do you enter in your XF STMP settings?
Is the username an email address?
 
Yes, in the STMP settings, i have
Server Name: email-smtp.us-east-1.amazonaws.com
Port: 465
Use Transport Layer Security (TLS): Yes
Authentication:
Your SMTP credentials - see below.


Then I click on Create my SMTP credentials, it will ask me for IAM username. Then it will allow me to download the xls file with IAM username, STMP username, STMP password.

What do you enter in your XF STMP settings?
Is the username an email address?
Choose: SSL instead of TLS under 'Encryption'.

...and try.
 
Has anyone had any luck and does is really only cost .50 per thousand. My userbase is 3000 so far and going up and need to send mass emails to user on events , etc.
 
I cant get SES to work, I have tried every combination of ports with SSL and TLS but still getting:

Zend_Mail_Protocol_Exception: Incorrect authentication data - library/Zend/Mail/Protocol/Abstract.php:431

I am using the SMTP Username and Password provided by Amazon and these work fine if tested with MS Outlook.
Anyone else have this working.
 
Decided to change over to SES myself... for all forum mail. Is the contact form still an issue in the latest version? I have forms I can use to manage the contact us internally, if it is.
 
The latest release uses Reply-To out of the box, so it should be ok.
But that doesn't work with SES. You need to have every 'sender' approved with Amazon SES. When I check the option that says "Sender info in From header on contact emails", SES refuses to send emails. But when it's unchecked, the mails are all sent from my 'Default Email Address'. Am I doing it right?
 
When I check the option that says "Sender info in From header on contact emails", SES refuses to send emails.
Well yes, because you're actually changing the sender there (which is the From address in SES) and thus it blocks it.

But when it's unchecked, the mails are all sent from my 'Default Email Address'. Am I doing it right?
Yes, the From will always be your email and Reply-To will be the email of the user.
 
Well yes, because you're actually changing the sender there (which is the From address in SES) and thus it blocks it.


Yes, the From will always be your email and Reply-To will be the email of the user.
Is there any way to overcome this issue? Say the mail goes from specific account specified by the admin, and the reply to is set to the user's own email?
 
I'm very confused because that's the default (with that option unchecked) and is exactly what I've been explaining as how it works. (If you're using Gmail to check stuff, you're running into a limitation there if the sender is the receiver; there's nothing we can do about that other than enabling the Sender option.)
 
Ok, what am I doing wrong. I understand SES needs email verified from sender, but I don't understand why when I test reply to thread with email notifications, that it is rejecting the email as though sending from the users email, instead of the verified forum email account.

Zend_Mail_Protocol_Exception: Email to anthonyparsons@gmail.com failed: Message rejected: Email address is not verified. - library/Zend/Mail/Protocol/Abstract.php:431

All the SMTP details are right. XF is talking to SES.

What am I missing? Any idea?
 
Actually, have you requested full access to SES? By default, it goes into Sandbox mode. I've just seen the notification and requested full access.
 
As far as I'm aware, people have been using SES to send "standard" emails without issue for some time and nothing has changed within XF. It was just the SES limitation on contact mails (which led to us changing the default method for how they were sent).

I assume that as long as your "default email address" is authenticated/verified with SES that is all that should be necessary.
 
I've been trying to get this working all afternoon. Can't get it to send via SES, even though the addresses have been verified and can send test mails
Code:
Server Error Log
Error Info
Zend_Mail_Protocol_Exception: Email to admin@mattwservices.co.uk failed: Message rejected: Email address is not verified. - library/Zend/Mail/Protocol/Abstract.php:431
Generated By: Matt, 3 minutes ago
Stack Trace
#0 /home/mattwservices/public_html/library/Zend/Mail/Protocol/Smtp.php(324): Zend_Mail_Protocol_Abstract->_expect(250, 600)
#1 /home/mattwservices/public_html/library/Zend/Mail/Transport/Smtp.php(215): Zend_Mail_Protocol_Smtp->data('Subject: Test\nT...')
#2 /home/mattwservices/public_html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /home/mattwservices/public_html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /home/mattwservices/public_html/library/XenForo/ControllerAdmin/User.php(1145): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /home/mattwservices/public_html/library/XenForo/ControllerAdmin/User.php(1024): XenForo_ControllerAdmin_User->_sendEmail(Array, Array, Object(Zend_Mail_Transport_Smtp))
#6 /home/mattwservices/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_User->actionEmailSend()
#7 /home/mattwservices/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/mattwservices/public_html/admin.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(54) "https://mattwservices.co.uk/admin.php?users/email-send"
  ["_GET"] => array(1) {
    ["users/email-send"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["test"] => string(15) "Send Test Email"
    ["criteria"] => string(96) "{"receive_admin_email":"1","secondary_group_ids":["3"],"user_state":["valid"],"is_banned":["0"]}"
    ["total"] => string(1) "3"
    ["from_name"] => string(14) "MattW Services"
    ["from_email"] => string(28) "no-reply@mattwservices.co.uk"
    ["email_title"] => string(4) "Test"
    ["email_format"] => string(4) "text"
    ["email_body"] => string(4) "Test"
    ["_xfConfirm"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
 
Can't send to the simulator account either
Code:
Zend_Mail_Protocol_Exception: Email to success@simulator.amazonses.com failed: Message rejected: Email address is not verified. - library/Zend/Mail/Protocol/Abstract.php:431
Generated By: Matt, A moment ago
Stack Trace
#0 /home/mattwservices/public_html/library/Zend/Mail/Protocol/Smtp.php(324): Zend_Mail_Protocol_Abstract->_expect(250, 600)
#1 /home/mattwservices/public_html/library/Zend/Mail/Transport/Smtp.php(215): Zend_Mail_Protocol_Smtp->data('Subject: Testin...')
#2 /home/mattwservices/public_html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /home/mattwservices/public_html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /home/mattwservices/public_html/library/XenForo/ControllerAdmin/User.php(1145): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /home/mattwservices/public_html/library/XenForo/ControllerAdmin/User.php(1050): XenForo_ControllerAdmin_User->_sendEmail(Array, Array, Object(Zend_Mail_Transport_Smtp))
#6 /home/mattwservices/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_User->actionEmailSend()
#7 /home/mattwservices/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/mattwservices/public_html/admin.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(54) "https://mattwservices.co.uk/admin.php?users/email-send"
  ["_GET"] => array(1) {
    ["users/email-send"] => string(0) ""
  }
  ["_POST"] => array(9) {
    ["criteria"] => string(90) "{"receive_admin_email":"1","username":"MatthewJ","user_state":["valid"],"is_banned":["0"]}"
    ["total"] => string(1) "2"
    ["from_name"] => string(14) "MattW Services"
    ["from_email"] => string(28) "no-reply@mattwservices.co.uk"
    ["email_title"] => string(7) "Testing"
    ["email_format"] => string(4) "text"
    ["email_body"] => string(7) "Testing"
    ["_xfConfirm"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
 
Hey @MattW, yes, I have full SES access with 50k daily limit.

Yer, I just played around with it again, and I get:

Code:
Error Info
Zend_Mail_Protocol_Exception: Email to *****@gmail.com failed: Message rejected: Email address is not verified. - library/Zend/Mail/Protocol/Abstract.php:431
Generated By: Unknown Account, A moment ago
Stack Trace
#0 /home/ptsdforu/public_html/c/library/Zend/Mail/Protocol/Smtp.php(324): Zend_Mail_Protocol_Abstract->_expect(250, 600)
#1 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Smtp.php(215): Zend_Mail_Protocol_Smtp->data('Subject: Test -...')
#2 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /home/ptsdforu/public_html/c/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /home/ptsdforu/public_html/c/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /home/ptsdforu/public_html/c/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.99999904633)
#6 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_MailQueue->execute(Array, Array, 7.99999904633, '')
#7 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.99999904633, '', false)
#8 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#9 /home/ptsdforu/public_html/c/deferred.php(23): XenForo_Model_Deferred->run(false)
#10 {main}
Request State
array(3) {
  ["url"] => string(37) "https://www.myptsd.com/c/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(22) "/c/threads/test.52540/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

Added: I am running 1.4.5
 
Last edited:
Top Bottom