Вот код, который я отправлял
Код: Выделить всё
$mail = new PHPMailer(true);
// Server settings
$mail->isSMTP();
$mail->Host = 'smtp.office365.com';
$mail->SMTPAuth = true;
$mail->Username = $email;
$mail->Password = $password;
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
// Recipient & sender info
$mail->setFrom($email, 'no-reply');
$mail->addAddress($receiver);
$mail->addReplyTo($email);
// Message content
$mail->isHTML(true);
$mail->Subject = 'Here is the subject';
$mail->Body = 'Here is body';
// Send mail
$mail->send();
Подробнее здесь: https://stackoverflow.com/questions/785 ... unk-folder
Мобильная версия