Author Topic: How can I set the mail?  (Read 13 times)

CalvinV01

  • Newbie
  • *
  • Posts: 1
    • View Profile
How can I set the mail?
« on: May 18, 2018, 12:49:45 PM »
I want to set the send mail function is send from my gmail, can anyone teach me?

Here is the code:


class EmailConfig {

   public $default = array(
      'transport' => 'Mail',
      'from' => 'you@localhost',
      //'charset' => 'utf-8',
      //'headerCharset' => 'utf-8',
   );

   public $smtp = array(
      'transport' => 'Smtp',
      'from' => array('site@localhost' => 'My Site'),
      'host' => 'localhost',
      'port' => 25,
      'timeout' => 30,
      'username' => 'user',
      'password' => 'secret',
      'client' => null,
      'log' => false,
      //'charset' => 'utf-8',
      //'headerCharset' => 'utf-8',
   );

   public $fast = array(
      'from' => 'you@localhost',
      'sender' => null,
      'to' => null,
      'cc' => null,
      'bcc' => null,
      'replyTo' => null,
      'readReceipt' => null,
      'returnPath' => null,
      'messageId' => true,
      'subject' => null,
      'message' => null,
      'headers' => null,
      'viewRender' => null,
      'template' => false,
      'layout' => false,
      'viewVars' => null,
      'attachments' => null,
      'emailFormat' => null,
      'transport' => 'Smtp',
      'host' => 'localhost',
      'port' => 25,
      'timeout' => 30,
      'username' => 'user',
      'password' => 'secret',
      'client' => null,
      'log' => true,
      //'charset' => 'utf-8',
      //'headerCharset' => 'utf-8',
   );

}