Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created March 22, 2018 06:15
Show Gist options
  • Save taleeb35/80e1f43b42f754beca8e8349e284c355 to your computer and use it in GitHub Desktop.
Save taleeb35/80e1f43b42f754beca8e8349e284c355 to your computer and use it in GitHub Desktop.
<?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 } ?>
@JuliusSenkus
Copy link

Dude, maybe you don't want to post your password publicly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment