Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

customize amazons SES - remove amazonses.com

I finally got SES to work, but now im confronted with another problem
The email sent leaves amazonses.com in the from and mailed-by fields like this
I am currently on sandbox access

from:    [email protected] via amazonses.com 
to:  [email protected]
date:    Sat, Jun 2, 2012 at 3:30 PM
subject:     Subject message
mailed-by:   amazonses.com

question: how can i remove amazonses.com from these 2 fileds and replace the 'mailed-by' field with my companies email address?

heres my php

function sendMail($to, $subject, $message, $from ) {
    require_once('sdk-1.5.6.2/sdk.class.php');
    
    $AWS_KEY = "********************";
    $AWS_SECRET_KEY = "****************************************";

    $amazonSes = new AmazonSES(array( "key" => $AWS_KEY, "secret" => $AWS_SECRET_KEY ));
    
    $response = $amazonSes->send_email(
        $from,
        array('ToAddresses' => array($to)),
        array(
            'Subject.Data' => $subject,
            'Body.Html.Data' => $message,
        )
    );

    if (!$response->isOK()) {
        return false;
    }else {
        return true;
    }
    return false;
}
sendMail('[email protected]', "Body message", "Subject message", "[email protected]" );
like image 951
t q Avatar asked Jun 03 '12 00:06

t q


People also ask

What does via Amazon SES com mean?

Amazon SES (Simple Email Service) is a cloud-based email service for sending both transactional and mass emails. Amazon SES offers a wide list of possible integrations: SMTP interface, AWS SDKs for seamless integration with your apps, and even email clients or other types of software.

What is Amazon SES email?

Amazon Simple Email Service (SES) is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application. You can configure Amazon SES quickly to support several email use cases, including transactional, marketing, or mass email communications.

What is AWS sandbox SES?

The Amazon SES sandbox is an area where new users can test the capabilities of Amazon SES. When your account is in the sandbox, you can only send email to verified identities. A verified identity is an email addresses or domain that you've proven that you own.


1 Answers

Since july 2012 it is easy to sign outgoing mail via SES itself.

Instructions are easy and straightforward.

p.s.: sorry for nekroposting, but this question is the one that popped up when I tried to do the same thing.

like image 178
Dmitry Mukhin Avatar answered Sep 19 '22 15:09

Dmitry Mukhin