Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "phpmailer/class.phpmailer.php"; //include phpmailer class
- $msg= "hi";
- $mail = new PHPMailer();
- //Set up SMTP
- $mail->IsSMTP(); //Sets up a SMTP connection
- $mail->SMTPAuth = true; // Connection with the SMTP does require authorization
- $mail->SMTPSecure = "ssl"; // Connect using a TLS connection
- $mail->Host = "ssl://smtp.gmail.com:465"; // Gmail SMTP server address
- $mail->Port = 465; // Gmail SMTP port
- $mail->Encoding = '7bit';
- // Authentication
- $mail->Username = "newdummy90@gmail.com"; // Your full Gmail address
- $mail->Password = "dummy123"; // Your Gmail password
- $mail->SMTPDebug = 2;
- $mail->SetFrom('newdummy90@gmail.com');//
- $mail->Subject = "Patient_Heart_Temp_Details";
- $mail->MsgHTML($msg);
- // Send To
- $mail->AddAddress("nagashri27@gmail.com");
- $result = $mail->Send();
- $message = $result ? 'Successfully Sent!' : 'Sending Failed!';
- unset($mail);
Add Comment
Please, Sign In to add comment