I have a php page which should send me an email (to my gmail account) but I get an error which I am stuck on
Mailer Error: Language string failed to load: recipients_failedadmin1sdasp@gmail.com
Does it mean anything to you?
Thanks...
| SitePoint Sponsor |





I have a php page which should send me an email (to my gmail account) but I get an error which I am stuck on
Mailer Error: Language string failed to load: recipients_failedadmin1sdasp@gmail.com
Does it mean anything to you?
Thanks...
"Oh, and Jenkins--apparently your mother died this morning."





Does your script work with other email accounts, or is it just failing with your gmail account? Also, it might be helpful if you showed us some code.
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
Showcase your music collection on the Web





Yes, it was workiong fine with mail(), but because I wanted th add 6 attachments I was told to use php mailer,
heres the php code
And heres the page that runs itPHP Code:
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsHTML(true); // send as HTML
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.gmail.com"; // SMTP server
$mail->Username = "admin1sdasp";
$mail->Password = "ddd";
$mail->From = $ASP_Email;
$mail->FromName = $ASP_Name;
$mail->AddAddress("admin1sdasp@gmail.com", "SDASP Administrator");
$mail->Subject = "SDASP PROVIDER APPLICATION";
$message = "These are the values that a user has tried to submit<br />";
$message .= '<form method=post action="http://testing.scasp.com/update_table_provider.php"><br />';
$message .= 'ASP Real Name: <input type="text" name="Real_Name" value="' . $Real_Name . '"><br />'
...
...
...
$message .= 'Attachment 5: <input type="text" name="Image5" value="' . $Image5 . '"><br />';
$message .= 'Attachment 6: <input type="text" name="Image6" value="' . $Image6 . '"><br />';
$mail->Body = $message;
//add atttachments
$mail->AddAttachment($Image1_name);
$mail->AddAttachment($Image2_name);
$mail->AddAttachment($Image3_name);
$mail->AddAttachment($Image4_name);
$mail->AddAttachment($Image5_name);
$mail->AddAttachment($Image6_name);
if(!$mail->Send())
{
echo "<p>Message was not sent</p>";
echo "<p>Mailer Error: " . $mail->ErrorInfo."</p>";
echo "<p>Please notify admin at admin@scasp.com</p>";
}
else
{
echo "<p>Message has been sent, please allow 24 hours for you web site to be up, thank you.</p>";
}
http://scasp.com/testing/request.php
Thanks
"Oh, and Jenkins--apparently your mother died this morning."





The readme documentation shows the following formats for attachments:
Is that the format for the attachments you're trying to use? Put some echo statements in your script just to verify:$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
Code:echo "Attachment 1: ".$Image1_name."<br>"; echo "Attachment 2: ".$Image2_name."<br>"; echo "Attachment 3: ".$Image3_name."<br>"; echo "Attachment 4: ".$Image4_name."<br>"; echo "Attachment 5: ".$Image5_name."<br>"; echo "Attachment 6: ".$Image6_name."<br>";
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
Showcase your music collection on the Web





Yes, but I'm trying to attach something thats an upload button to the user, which I use php to make a variable
then, would this workPHP Code:// Obtain file upload vars
$Image1 = $_FILES['Image1']['tmp_name'];
$Image1_type = $_FILES['Image1']['type'];
$Image1_name = $_FILES['Image1']['name'];
$Image2 = $_FILES['Image2']['tmp_name'];
$Image2_type = $_FILES['Image2']['type'];
$Image2_name = $_FILES['Image2']['name'];
$Image3 = $_FILES['Image3']['tmp_name'];
$Image3_type = $_FILES['Image3']['type'];
$Image3_name = $_FILES['Image3']['name'];
$Image4 = $_FILES['Image4']['tmp_name'];
$Image4_type = $_FILES['Image4']['type'];
$Image4_name = $_FILES['Image4']['name'];
$Image5 = $_FILES['Image5']['tmp_name'];
$Image5_type = $_FILES['Image5']['type'];
$Image5_name = $_FILES['Image5']['name'];
$Image6 = $_FILES['Image6']['tmp_name'];
$Image6_type = $_FILES['Image6']['type'];
$Image6_name = $_FILES['Image6']['name'];
or how would I do it?PHP Code://add atttachments
$mail->AddAttachment($Image1_name);
$mail->AddAttachment($Image2_name);
$mail->AddAttachment($Image3_name);
$mail->AddAttachment($Image4_name);
$mail->AddAttachment($Image5_name);
$mail->AddAttachment($Image6_name);
Thanks
What gets output is
AddAttachment1:sample1.gif
From
but how do I get a /images/ASP_photos/ before it?PHP Code:echo "AddAttachment1:".$Image1_name."<br>";
"Oh, and Jenkins--apparently your mother died this morning."




Concatenate the string using a dot ".". But why do you need to do that? tmp_name is where the file is.Originally Posted by lukeurtnowski
PHPMailer's memory usage on attachments isn't great. Especially if you're sending 6 you may risk hitting the 8MB limit even on smallish attachments.
Take a look at these figures: http://www.swiftmailer.org/phpmailer/ (about 3/4 down the page)
Swift would do it like this, and use at least 20% memory. PHPMailer seemed to hang lots when I used to use it.
PHP Code:$mailer->addAttachment(file_get_contents($Image1), $image1_name, $image1_type);
$mailer->addAttachment(file_get_contents($Image2), $image2_name, $image2_type);
// repeat for each attachment
Bookmarks