douyaju4259 2013-12-10 14:57
浏览 51
已采纳

无法使用PHP从appfog发送电子邮件

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' => 'shamir.towsif@gmail.com',
                'smtp_pass' => 'xxxx',
                'mailtype' => 'html',
                'charset' => 'iso-8859-1',
                'wordwrap' => true
            );
            $message = "Random message";
            $this->load->library('email', $config);
            $this->email->set_newline("
");
            $this->email->from('shamir.towsif@gmail.com', 'Vatiali');
            $this->email->to($this->input->post('email'));
            $this->email->subject('Verify Email');
            $this->email->message($message);
            $this->email->send();
  • 写回答

1条回答 默认 最新

  • douwuying4709 2014-02-19 11:28
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源