Example #1
0
<?php

//header('Content-Type: text/html; charset= utf-8');
require 'PHPMailerAutoload.php';
$mail = new PHPMailer();
//$mail->SMTPDebug = 3;                               // Enable verbose debug output
$mail->setLanguage('ru', '/language');
//$mail->isSMTP();     /* !!!! ДЛЯ БОЯ */
$mail->isMAIL();
/* !!!! ДЛЯ ЛОКАЛЬНОГО ТЕСТИРОВАНИЯ */
$mail->CharSet = "utf-8";
// Set mailer to use SMTP
//$mail->Host = 'smtp.timeweb.ru';  /* !!!! ДЛЯ БОЯ */
$mail->Host = 'localhost';
/* !!!! ДЛЯ ЛОКАЛЬНОГО ТЕСТИРОВАНИЯ */
$mail->SMTPAuth = true;
// Enable SMTP authentication
$mail->Username = '******';
// SMTP username
$mail->Password = '******';
// SMTP password
$mail->SMTPSecure = 'ssl';
// Enable TLS encryption, `ssl` also accepted
$mail->Port = 465;
// TCP port to connect to
$mail->From = '*****@*****.**';
$mail->FromName = 'drovavozim.ru';
$mail->addAddress('*****@*****.**', 'Заявка с сайта');
// Add a recipient
$mail->addBCC('*****@*****.**');
$mail->isHTML(true);