Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require("PHPMailer_5.2.0/class.phpmailer.php");
- $mail = new PHPMailer();
- $mail->IsSMTP(); // set mailer to use SMTP
- $mail->Host = '111.118.212.86'; // specify main and backup server
- $mail->SMTPSecure = 'ssl';
- $mail->SMTPAuth = true; // turn on SMTP authentication
- $mail->Username = 'contact@asianchemicalsslg.in'; // SMTP username
- $mail->Password = ''; // SMTP password
- $mail->Port = 465;
- $mail->From = 'contact@asianchemicalsslg.in';
- $mail->FromName = '';
- $mail->AddAddress('TOemailID');
- $mail->WordWrap = 50; // set word wrap to 50 characters
- $mail->IsHTML(true); // set email format to HTML
- $mail->Subject = "Enquiry from Website";
- $mail->Body = "Enquiry Type: " .$type."<br>"."Name: " .$name."<br>"."Email: ".$email."<br>"."Contact No: " .$contact."<br>"."City: " .$city."<br>"."Type of Business: " .$business."<br>";
- $mail->AltBody = "This is the body in plain text for non-HTML mail clients";
- if(!$mail->Send())
- {
- echo "Message could not be sent. <p>";
- echo "Mailer Error: " . $mail->ErrorInfo;
- exit;
- }
- ?>
Add Comment
Please, Sign In to add comment