Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

send gmail

<?php
return [
	'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',

	...

	'components' => [

		'mailerGmail' => [
			'class' => 'yiiswiftmailerMailer',
			'viewPath' => '@common/mail',
			'useFileTransport' => false,

			'transport' => [
				'class' => 'Swift_SmtpTransport',
				'host' => 'smtp.gmail.com',
				'username' => 'gmail.helper.account',
				'password' => 'PUT-YOUR-PASSWORD-HERE',
				'port' => '587',
				'encryption' => 'tls',
			],
		],
    ],
];
Source by www.yiiframework.com #
 
PREVIOUS NEXT
Tagged: #send #gmail
ADD COMMENT
Topic
Name
9+1 =