PDA

View Full Version : Universal Email not attaching document to recipient


admin140217
08-11-2009, 01:29 PM
Hi All,

I'm using Universal email in a PHP site and I have gotten the mail to send and CC to whom it supposed to on Godaddy but I'm having two problems.


1st problem, the form only has 4 fields Name, Company, Email, and a checkbox. Only two fields are being passed to the body of the email.

2nd problem, The email is supposed to send a document attachment to the recipient after form submission, I can see it's trying to attach the document in Godaddy but ut stops there and doesn't get passed to the recipient.

The URL is www.karencardcommunications.com/index_new.php

I'm not real familiar if at all with PHP, can someone shed some light on this for me and help to solve these issues?

Thanks

Jason Byrnes
08-12-2009, 08:53 AM
I will need to examine the code on your page to be able to see what is wrong. I have submitted a technical support ticket for you. Please respond to the support ticket by logging into your support history:
http://www.webassist.com/mywebassist/supporthistory.php

admin140217
08-12-2009, 08:56 AM
Thanks Jason, I will do that.

Jason Byrnes
08-13-2009, 04:26 PM
in debugging this issue we found that the reference to the file was not quite correct. We changed:

$WA_MailObject = WAUE_AddAttachment($WA_MailObject,"/docs/Special-Report_Top-3_Mistakes.pdf");


to:

$WA_MailObject = WAUE_AddAttachment($WA_MailObject,realpath("docs/Special-Report_Top-3_Mistakes.pdf"));


To get the file attached. In this case, it was coming through with a .dat file extesnion however.

We found that there where some missing semi colons in the WA_UniversalEmail\Mail_for_Linux_PHP.php file that was shipped with Universal Email 2.8.

I changed lines 234 - 236:

$mailAttachments .= " name=\"".basename($fileArr[3])."\"".$lineEnd;
$mailAttachments .= "Content-Transfer-Encoding: ".$fileArr[1].$lineEnd;
$mailAttachments .= "Content-Disposition: inline";


to:

$mailAttachments .= "; name=\"".basename($fileArr[3])."\"".$lineEnd;
$mailAttachments .= "Content-Transfer-Encoding: ".$fileArr[1].$lineEnd;
$mailAttachments .= "Content-Disposition: inline;";




to fix that problem.