elentz Posted January 15, 2008 Share Posted January 15, 2008 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 I am getting the To From and Reply to email addys from a MySQL DB table 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/86065-phpmailer-error-help/ Share on other sites More sharing options...
Recommended Posts