Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require( 'class.phpmailer.php' );
- $mail = new PHPMailer;
- $mail->IsSMTP();
- $mail->SMTPAuth = true;
- $mail->Host = "tls://smtp.gmail.com";
- $mail->Port = 25;
- $mail->Username = "xxxx@gmail.com";
- $mail->Password = "xxxxx";
- //Sending the actual email
- $mail->setFrom('xxxx2@gmail.com', 'Aaron');
- $mail->addAddress('xxxx2@gmail.com', 'Aaron'); // Add a recipient
- $mail->isHTML(false); // Set email format to HTML
- $mail->Subject = 'Calculation form results from ';
- $mail->Body = 'testing...';
- if(!$mail->send()) {
- echo 'Message could not be sent. ';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement