[Solved] 554 Transaction failed: Expected [Amazon SES]

 In IT_Consultant_Singapore

How to solve 554 Transaction failed: Expected ‘;’, got “. [Mostly on Amazon SES SMTP]

host ses-smtp-….. amazonaws.com
SMTP error from remote mail server after end of data:
554 Transaction failed: Expected ‘;’, got “.docx”
554 Transaction failed: Expected ‘;’, got “.pdf”
554 Transaction failed: Expected ‘;’, got “.xlsx”
This is because your attached/uploaded file name got errors & AWS-SES blocked it.

Make sure the attached filename has  ‘No space, No parenthesis, No special strings on it’.

If the file is uploading by public via webforms, use Preg_Replace to rename it accordingly.

// The below code will remove anything that is not a-z, 0-9 or a dot, space.
$file_name = preg_replace(“/[^a-zA-Z0-9.]/”, “”, $file_name);

Recent Posts

Leave a Comment