2329 posts
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Helped several times protecting Envato Market against copyright violations
+6 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?

3184 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 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.

2329 posts
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Helped several times protecting Envato Market against copyright violations
+6 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!!!

3184 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 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