2333 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
+5 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?

3322 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 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.

2333 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
+5 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!!!

3322 posts
  • Provided great contribution to our forums
  • Nominated Community Superstar of the month
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+18 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by