Guest User

Untitled

a guest
Jan 6th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.14 KB | None | 0 0
  1. <?php
  2. require("PHPMailer_5.2.0/class.phpmailer.php");
  3.  
  4. $mail = new PHPMailer();
  5. $mail->IsSMTP();                                      // set mailer to use SMTP
  6. $mail->Host = '111.118.212.86';  // specify main and backup server
  7. $mail->SMTPSecure    = 'ssl';
  8. $mail->SMTPAuth = true;     // turn on SMTP authentication
  9. $mail->Username = 'contact@asianchemicalsslg.in';  // SMTP username
  10. $mail->Password = ''; // SMTP password
  11. $mail->Port = 465;
  12. $mail->From = 'contact@asianchemicalsslg.in';
  13. $mail->FromName = '';
  14.  
  15. $mail->AddAddress('TOemailID');
  16.  
  17. $mail->WordWrap = 50;                                 // set word wrap to 50 characters
  18. $mail->IsHTML(true);                                  // set email format to HTML
  19. $mail->Subject = "Enquiry from Website";
  20. $mail->Body    = "Enquiry Type: " .$type."<br>"."Name: " .$name."<br>"."Email: ".$email."<br>"."Contact No: " .$contact."<br>"."City: " .$city."<br>"."Type of Business: " .$business."<br>";
  21. $mail->AltBody = "This is the body in plain text for non-HTML mail clients";
  22. if(!$mail->Send())
  23. {
  24.    echo "Message could not be sent. <p>";
  25.    echo "Mailer Error: " . $mail->ErrorInfo;
  26.    exit;
  27. }
  28. ?>
Add Comment
Please, Sign In to add comment