Guest User

Untitled

a guest
Aug 2nd, 2018
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. i used php mailer function but not send function?
  2. $body .= "<table width="75%" border="0" cellspacing="0" cellpadding="0">";
  3. $body .= "<tr><td width="30%">Name : </td><td> $_POST[name]</td></tr>";
  4. $body .= "<tr><td width="30%">Email : </td><td> $_POST[email]</td></tr>";
  5. $body .= "<tr><td width="30%">Country : </td><td> $_POST[phone]</td></tr>";
  6. $body .= "</table>";
  7.  
  8. require_once("Mobile/class.phpmailer.php");
  9.  
  10. /* Values to display */
  11. $user_name = $_POST[name];
  12. $user_email = $_POST[email];
  13. $user_phone = $_POST[phone];
  14.  
  15. /* Values to display */
  16. $mail = new PHPMailer(); // defaults to using php "mail()"
  17. $body = eregi_replace("[]",'',$body);
  18. $mail->SetFrom('haresh.kachhadiya@gmail.com', $user_name);
  19. $address = "haresh.kachhadiya@gmail.com";
  20. $mail->AddAddress($address, "Administrator");
  21. $mail->AddCC('haresh.kachhadiya@gmail.com', "shreyas");
  22. $mail->Subject = "Place Order Contact Page - Detail";
  23. $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
  24. $mail->IsHTML(true); // send as HTML
  25. $mail->Body = 'This is the test mail';
  26.  
  27. if(!$mail->Send()) {
  28. echo 'Message was not sent <p>';
  29. echo 'Mailer Error: ' . $mail->ErrorInfo;
  30. }
  31. else
  32. {
  33. echo "hi....hi";
  34. exit;
Add Comment
Please, Sign In to add comment