Page MenuHomePhabricator

Fix undefined property in Amazon SES
ClosedPublic

Authored by bajb on Nov 26 2013, 8:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 5:56 PM
Unknown Object (File)
Mon, Nov 25, 2:26 PM
Unknown Object (File)
Fri, Nov 22, 7:26 PM
Unknown Object (File)
Nov 18 2024, 10:33 AM
Unknown Object (File)
Nov 15 2024, 9:31 AM
Unknown Object (File)
Nov 15 2024, 9:31 AM
Unknown Object (File)
Nov 15 2024, 9:31 AM
Unknown Object (File)
Nov 15 2024, 9:31 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP8af2f0d755a2: Fix undefined property in Amazon SES
Summary

When sending an email through ses, the body property on the response object is not set, throwing a notice. This causes the system to assume a messsage failure, and requeues the email.

As the email is actually delivered, it causes an email bomb :(

Message Undefined property: stdClass::$body
#0 /sidekick/phabricator/phabricator/externals/amazon-ses/ses.php(571): PhutilErrorHandler::handleError(8, 'Undefined prope...', '/sidekick/phabr...', 571, Array)
#1 [internal function]: SimpleEmailServiceRequest->__responseWriteCallback(Resource id #290, '<SendRawEmailRe...')
#2 /sidekick/phabricator/phabricator/externals/amazon-ses/ses.php(526): curl_exec(Resource id #290)
#3 /sidekick/phabricator/phabricator/externals/amazon-ses/ses.php(267): SimpleEmailServiceRequest->getResponse()
#4 /sidekick/phabricator/phabricator/src/applications/metamta/adapter/PhabricatorMailImplementationAmazonSESAdapter.php(33): SimpleEmailService->sendRawEmail('To: brooke.brya...')
#5 /sidekick/phabricator/phabricator/externals/phpmailer/class.phpmailer-lite.php(502): PhabricatorMailImplementationAmazonSESAdapter->executeSend('To: brooke.brya...')
#6 /sidekick/phabricator/phabricator/src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerLiteAdapter.php(91): PHPMailerLite->Send()
#7 /sidekick/phabricator/phabricator/src/applications/metamta/storage/PhabricatorMetaMTAMail.php(631): PhabricatorMailImplementationPHPMailerLiteAdapter->send()
#8 /sidekick/phabricator/phabricator/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php(130): PhabricatorMetaMTAMail->sendNow()
#9 /sidekick/phabricator/libphutil/src/parser/argument/PhutilArgumentParser.php(396): PhabricatorMailManagementSendTestWorkflow->execute(Object(PhutilArgumentParser))
#10 /sidekick/phabricator/libphutil/src/parser/argument/PhutilArgumentParser.php(292): PhutilArgumentParser->parseWorkflowsFull(Array)
#11 /sidekick/phabricator/phabricator/scripts/mail/manage_mail.php(28): PhutilArgumentParser->parseWorkflows(Array)
#12 {main}

Test Plan

Send a test email through SES mail provider running on php 5.5

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This is actually an external open source project --

http://www.orderingdisorder.com/aws/ses/

Looks like we are a version behind? That said, a quick grok of the new version didn't seem to fix this issue directly.

(One sec, just trying to get some kind of Adobe/Akamai thing to stop eating my entire system.)

I didn't see a direct fix for this in 0.8.2 either.

It would be nice to distinguish between actual delivery failures and stuff like this, but that might require some more extensive surgery. This seems like a step forward, at least.

Closed by commit rP8af2f0d755a2 (authored by @bajb, committed by @epriestley).