1

I am developing an Codeigniter based website and I need to send emails to people when they are signup up. My server is hosted at Amazon EC2.

I am trying to use their Amazon Simple Email Service and I am using the below library to get that working. I get no error but the sending fails. I am currently in Sandbox mode so I can only send (when it works) to my registered email address but that fails too.

I have configured the library using my AWS credentials. What can be wrong?

This is the library that I am using:

https://github.com/joelcox/codeigniter-amazon-ses

This is my controller code:

 // Load the Library $this->load->library('amazon_ses'); // Configure and send email $this->amazon_ses->to('[email protected]'); $this->amazon_ses->subject('Open me!'); $this->amazon_ses->message('<strong>Use HTML</strong>'); if ($this->amazon_ses->send()) { echo "Successfully sent!"; } else { echo "Failure!"; } $this->amazon_ses->debug(TRUE); 

1 Answer 1

3
$this->amazon_ses->debug(TRUE); 

That debug-line should be used before calling ...->send(), try this and check what AmazonSES answers:

$this->load->library('amazon_ses'); $this->amazon_ses->to('[email protected]'); $this->amazon_ses->subject('Open me!'); $this->amazon_ses->message('<strong>Use HTML</strong>'); $this->amazon_ses->debug(TRUE); print_r( $this->amazon_ses->send() ); 
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! I get the error: MissingAuthenticationToken. I have setup my AWS credentials in the config file. What can be missing?
@JonathanClark can you share what you did to cUrl?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.