28, May 2012

phpmailer errors - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: phpmailer errors
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: phpmailer errors  (Read 2777 times)
Sandwich Artist
*
Posts: 25
186 credits
Members referred : 0


« on: Mar 12, 2008, 06:43:40 pm »

I'm using the phpmailer to add an attachment and mail it to the client as well as the employee.  Well I can send to as many internal addresses as I want but I always get an SMTP error when trying to send to an outside address, even known good ones...Here's the error I reveive:

Mailer Error: SMTP Error: The following recipients failed:

Here's the code I'm using for everthign:

<?php

$mail = new PHPMailer();
                     
                     
$mail->From     = $MAEmail;
$mail->FromName = $MAName;
$mail->Host     = "smtp.looktoliberty.com";
$mail->Mailer   = "smtp";
$mail->ContentType = "text/html";
$mail->Subject = "PreApproval Letter from ".$MAName;
                     
// HTML body
$body  = $message;
$mail->Body    = $body;
$mail->AddAddress($MAEmail, $borEmail);

if($theLoanType == 174 || $theLoanType == 176)
{
  $mail->AddAttachment("AmendatoryClause(Letter).pdf", "AmendatoryClause(Letter).pdf");  // optional name
}
                     
if(!$mail->Send())
{
  echo "There has been a mail error sending to " . $borEmail.", ".$MAEmail . "<br>";
  echo "Mailer Error: " . $mail->ErrorInfo . "<br />";
}
else
{
  echo "You have successfully sent the PreApproval letter to:  ".$borEmail."";
}

// Clear all addresses and attachments for next loop
$mail->ClearAddresses();
$mail->ClearAttachments();

?>
« Last Edit: Mar 12, 2008, 09:12:39 pm by msthac01 »
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Mar 14, 2008, 08:24:48 am »

First of all, are you sure you can send email with no password from your SMTP server?

If you can this may be caused because your server is blacklisted.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Mar 14, 2008, 08:35:57 am »

First of all, are you sure you can send email with no password from your SMTP server?

If you can this may be caused because your server is blacklisted.

I'm almost sure he need to connect first, you need to add this vars to:

   $mail->SMTPAuth = true; 
   $mail->Username = "mailuser";
   $mail->Password = "mailpw";

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7653
Tags : phpmailer errors smtp addresses Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: phpmailer errors
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:02:23 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.