Skip to content

Instantly share code, notes, and snippets.

@hackerrahul
Created December 13, 2018 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hackerrahul/81f8889dbb541aaaf5e4d75aecdfea08 to your computer and use it in GitHub Desktop.
Save hackerrahul/81f8889dbb541aaaf5e4d75aecdfea08 to your computer and use it in GitHub Desktop.
<?php
//Server settings
$mail->SMTPDebug = 0; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'YOUR_HOST_HERE'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'YOUR_SMTP_USERNAME'; // SMTP username
$mail->Password = 'YOUR_SMTP_PASSWORD'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
//Recipients
$mail->setFrom('YOUR_EMAIL_ADDRESS', 'YOUR_NAME'); //SET "FROM" EMAIL AND NAME.
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment