Jump to content

Recommended Posts

I am new to PHPmailer and I have run into a problem.  I have tried all I know and I keep getting this error:

 

Mailer Error: Language string failed to load: instantiate

 

Here's my code:

 


-- $sql = "SELECT
Vtiger_quotescf.quoteid,
Vtiger_quotescf.cf_530,
vtiger_quotescf.cf_554,
vtiger_quotescf.cf_556,
vtiger_quotescf.cf_558,
vtiger_quotescf.cf_560
FROM
vtiger_quotescf
Inner Join vtiger_quotes ON vtiger_quotes.quoteid = vtiger_quotescf.quoteid
WHERE
vtiger_quotes.quoteid =  '$quote_id'";

$result=mysql_query($sql);
$row=mysql_fetch_assoc($result);
//$quote_id = $row['$quote_id'];
$specialinstructions=$row['cf_530'];
$emailpdf=$row['cf_554'];
$emailto=$row['cf_556'];
$emailfrom=$row['cf_558'];
$salesperson=$row['cf_560'];

//****************Code to create the PDF as a string variale so it can be emailed ***********

$pdf->Output("","S");
$doc = $pdf->Output("","S");

//*******************Setup and send the PDF as an attachment***************

require("/var/www/cqicrm5/customstuff/PHPMailer/class.phpmailer.php");
$mail->PluginDir = "/var/www/cqi/PHPMailer";
$mail = new PHPMailer();
$mail->From = $emailfrom;
$mail->FromName = ("CommuniQuest Sales Dept.");
$mail->AddAddress($emailto);
$mail->AddReplyTo("sales@comm.biz","Sales Dept." );
$mail->WordWrap = 50;                                // set word wrap to 50 characters
$mail->Subject = ("Here is the proposal you requested.");
$mail->Body    = ("The proposal you requested is inclosed.  Please contact us with any questions you may have.  Thank you for considering us.");
$mail->AddStringAttachment($doc,"Proposal # $quote_id","base64","MIME");

if(!$mail->Send())
{

echo "Message could not be sent. <p>";
  echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "The Proposal has been sent";

 

 

I have the language file in a languages folder in the PHPMailer folder.

 

If I manually enter the To , From and the Reply the email is sent perfectly.  Can someone take a look at this and tell me what I have wrong?

 

Thank you very much

 

Ed

Link to comment
https://forums.phpfreaks.com/topic/86170-phpmailer-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.