вот мой php.ini
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = aspmx.l.google.com
; http://php.net/smtp-port
smtp_port = 587
require_once 'Mail.php';
public function sendEmail() {
$mail = New Mail();
$header = array (
'From' => 'from@gmail.com',
'Subject' => 'Hello'
);
$auth = array (
'auth' => true,
'host' => 'email.dev',
'username' => 'iam@gmail.com'
'password' => 'мой пароль от почты iam@gmail.com'
);
$smtp = $mail->factory('smtp', $auth);
$smtp->send('кому@yandex.ru', $header, 'Hi...ok');
}