CakePHP-2.0: How can i send email from a gmail account using CakEmail and SMTP setting?

前端 未结 5 1280
醉酒成梦
醉酒成梦 2021-02-10 03:49

I\'m trying to send email from a gmail account using CakEmail and SMTP settings .

It would be nice if someone tell the process step by step what to do .

I have a

5条回答
  •  没有蜡笔的小新
    2021-02-10 04:02

    The right configuration is:

    public $gmail = array(
        'host' => 'ssl://smtp.gmail.com',
        'port' => 465,
        'username' => 'my@gmail.com',
        'password' => 'secret',
        'transport' => 'Smtp'
    );
    

    So, don't forget the transport element.

提交回复
热议问题