Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'PHPMailer/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->From = 'from@example.com';
- $mail->FromName = 'Mailer';
- $mail->addAddress('ian.dunn@example.com', 'Josh Adams'); // Add a recipient
- $mail->addReplyTo('info@example.com', 'Lukáš');
- $mail->Subject = '[test] #21659-core';
- $mail->Body = 'hello from phpmailer directly';
- $mail->CharSet = 'UTF-8';
- $mail->addCustomHeader( 'Content-Type: text/plain; charset=UTF-8' );
- $mail->addCustomHeader( 'Content-Transfer-Encoding: 8bit' );
- //var_dump($mail);die('');
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- exit;
- }
- echo 'Message has been sent';
Add Comment
Please, Sign In to add comment