Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("phpmailer/PHPMailerAutoload.php");
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'smtp.sendgrid.net';
- $mail->SMTPAuth = true;
- $mail->Username = 'takmeel'; // SMTP username
- $mail->Password = 'shineE065'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 25; // TCP port to connect to
- $mail->setFrom("info@shuraemirates.com", 'Shura Emirates');
- $mail->addAddress('taleeb.takmeel@gmail.com' , 'Taleeb Ahmad'); // Add a recipient
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Test';
- $mail->Body = 'Hello';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else { ?>
- <h3 style="color:#000;font-size: 14px;margin-bottom: 10px;">Thank you for contacting us. We will get back to you soon.</h3>
- <?php } ?>
Add Comment
Please, Sign In to add comment