DAtum

Product Design and Management, Entrepreneurship and the Business of Technology

Sending email using Amazon SES with attachments from php

This script is crazy – there is no known sane example on how to do this, so I had spend an inordinate amount of time hacking together this script. Basically, you need to replay the SMTP email composition to Amazon SES.

This code snippet should help everyone who is trying to put together a way to send email with attachments using SES from PHP.

About these ads

3 Responses to Sending email using Amazon SES with attachments from php

  1. sandeep February 25, 2013 at 9:38 pm

    Hi,

    I tried with your script. I did everything correctly but always getting ses error as:

    [Error] => CFSimpleXML Object
    (
    [Type] => Sender
    [Code] => InvalidParameterValue
    [Message] => Missing required header 'From'.
    )

    Any idea?

    Thanks,

  2. sandeep February 26, 2013 at 11:39 am

    Hi,

    I fixed this issue, the issue was with encoding the message. I’ve fixed this and it’s working fine for single attachment but now the problem is how to do it with multiple attachments and may be file can be of different-different types like one can be pdf, another can be an image etc…

    Thanks for this great script!

  3. Danish May 3, 2013 at 11:26 am

    Is it possible to send an email with multiple attachment with this code???

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: