Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'smtp.gmail.com';
- $mail->Port = '587';
- $mail->SMTPDebug = 1;
- $mail->SMTPSecure = 'tls';
- $mail->SMTPAuth = true;
- $mail->Username = 'facefinder2@gmail.com';
- $mail->Password = '************';
- $mail->SetFrom("facefinder2@gmail.com");
- //$mail->FromName = "FaceFinder";
- $mail->addAddress($receiver, $name);
- $mail->isHTML(true);
- $mail->Subject = $subject;
- $mail->Body = $body;
- $mail->AltBody = $plain_body;
- if(!$mail->send()) {
- //return false;
- echo "Mailer Error: " . $mail->ErrorInfo; die();
- } else {
- return true;
- //echo "Message has been sent successfully";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement