2322 posts
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
+1 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?

2957 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer 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.

2322 posts
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
+1 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!!!

2957 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer 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