无法使用php laravel框架将邮件从ubuntu 14.04 localhost发送到我的gmail帐户

时间:2015-12-24 06:38:57

标签: php laravel-4

我想从ubuntu机器localhost发送电子邮件,但我无法从laravel发送它已配置mail.php文件,如:

  1. '驱动' => ' SMTP',
  2. '主机' => ' smtp.gmail.com',
  3. '端口' => 587,
  4. '从' =>数组('地址' =>' mygmailaddress@gmail.com','名称' =>'我的名字'),
  5. '加密' => ' TLS',
  6. '用户名' => '我的Gmail帐户',
  7. '密码' => '我的Gmail帐户密码',
  8. ' sendmail的' => ' / usr / sbin / sendmail -bs',
  9. 并在php.ini文件中设置如下:

    
    
    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP=localhost
    ; http://php.net/smtp-port
    smtp_port=25
    
    ; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = me@example.com
    
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    sendmail_path =  "/usr/bin/sendmail -t"
    
    
    

    我已经使用了laravel mail :: send函数来发送电子邮件,但我正在收到错误消息,如

    enter image description here

0 个答案:

没有答案