Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPAuth = $config['smtp']['auth'];
- $mail->CharSet = 'cp1251';
- $mail->From = $gvars['site_email'];
- $mail->FromName = $gvars['tm_name'];
- $mail->Host = $config['smtp']['host'];
- $mail->Username = $config['smtp']['username'];
- $mail->Password = $config['smtp']['password'];
- $mail->IsHTML(false);
- $mail->ClearAddresses();
- $mail->AddAddress('***');
- $mail->Subject = iconv("UTF-8", "CP1251", 'Тема');
- $mail->Body = iconv("UTF-8", "CP1251", 'Тело письма');
- if (!$mail->Send()) {
- echo "Mailer Error: " . $mail->ErrorInfo;
- exit();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement