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.

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

报告相同问题?

悬赏问题

  • ¥15 SPSS分类模型实训题步骤
  • ¥15 求解决扩散模型代码问题
  • ¥15 工创大赛太阳能电动车项目零基础要学什么
  • ¥20 limma多组间分析最终p值只有一个
  • ¥15 nopCommerce开发问题
  • ¥15 torch.multiprocessing.spawn.ProcessExitedException: process 1 terminated with signal SIGKILL
  • ¥15 QuartusⅡ15.0编译项目后,output_files中的.jdi、.sld、.sof不更新怎么解决
  • ¥15 pycharm输出和导师的一样,但是标红
  • ¥15 想问问富文本拿到的html怎么转成docx的
  • ¥15 我看了您的文章,遇到了个问题。