This is my first time using appfog. I have a PHP application. I want to send email from the PHP application using appfog. I am using CodeIgniter framework.
I can send email from my localhost. But when I try to do the same thing using appfog I am getting error. It is saying that authentication has failed. My email sending PHP code is given below.
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'xxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => true
);
$message = "Random message";
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'Vatiali');
$this->email->to($this->input->post('email'));
$this->email->subject('Verify Email');
$this->email->message($message);
$this->email->send();
Another option could be to use AWS SNS to send your emails. Pretty easy to setup using the AWS SDK for PHP. You also get 1000 free messages per month on the free tier.