2337 posts
  • Affiliate Level 5
  • Author Level 6
  • Collector Level 2
  • Trendsetter
+7 more
CreativeMilk
says

A couple of my buyers have issue’s with there host’s, they dont allow the basic mail() function so i want to solve that by using the phpmailer class, but i cant seem to get is working. Any one knowledge of the phpmailer class?

5441 posts
  • Author Level 11
  • Moderator
  • Winner
  • 6 Years of Membership
+20 more
dtbaker
Moderator
says

Ya, phpMailer’s easy.

If mail() doesn’t work, then out-of-the-box phpMailer probably wont work either. You’ll have to try giving phpMailer some SMTP details.

$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
// tell it to use SMTP:
$mail->IsSMTP(); 
// tell it the SMTP server to use:
$mail->Host     = "mail.yourdomain.com"; 
// OPTIONAL, use SMTP authentication, needed by some hosts:
$mail->SMTPAuth = true;
$mail->Username = "xxxxx";
$mail->Password = "xxxxx";
etc....

Do you get any particular errors when you call $mail->Send();?

Maybe do a echo $mail->ErrorInfo; after the send() to see if there are any errors.

2337 posts
  • Affiliate Level 5
  • Author Level 6
  • Collector Level 2
  • Trendsetter
+7 more
CreativeMilk
says

dtbaker to the rescue ;)

Yes i was just looking at this on the site form phpmailer. I didn’t add any STMP setting so that why it probably doesn’t work.

Well i dont get any error’s just an blank page, so i know there’s something wrong.

I will add the errorinfo to the field and send it back to the buyer.

I will get back if this works or not.

Thanks for the fast help!!!

5441 posts
  • Author Level 11
  • Moderator
  • Winner
  • 6 Years of Membership
+20 more
dtbaker
Moderator
says
Well i dont get any error’s just an blank page, so i know there’s something wrong.

a blank page could mean it’s not even getting to the $mail->Send();

put this code ini_set("display_errors",true); ini_set("error_reporting",E_ALL); just before you include the phpMailer class files.

it could be something silly like they don’t have PHP5 enabled, or some of the phpMailer files are missing.

by
by
by
by
by
by