SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 447 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $mail->isSMTP();                            // Set mailer to use SMTP
  2.                 $mail->SMTPAuth = true;                     // Enable SMTP authentication
  3.                 $mail->Username = 'xx@gmail.com';          // SMTP username
  4.                 $mail->Password = 'xxxx'; // SMTP password
  5.                 $mail->Host = 'smtp.gmail.com';
  6.                 $mail->SMTPSecure = 'ssl';
  7.                 $mail->Port = 465;
  8.  
  9.                     //Set the encryption system to use - ssl (deprecated) or tls
  10.                 $mail->setFrom('info@example.com', 'CodexWorld');
  11.                 $mail->addReplyTo('info@example.com', 'CodexWorld');
  12.                 $mail->addAddress('john@gmail.com');   // Add a recipient
  13.                 $mail->addAddress($data['email']);   // Add a recipient
  14.                 $mail->isHTML(true);  // Set email format to HTML
  15.  
  16.                 $message = '
  17.  
  18.                 <p>HELLO</p>
  19.  
  20.  
  21.  
  22.  
  23.                 ';
  24.  
  25.                 $mail->msgHTML($message);
  26.  
  27.                 try {
  28.               if(!$mail->send())
  29.               {
  30.                   echo  $mail->ErrorInfo;
  31.               }else{
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top