Forums

Send attachment with email

MinMatch 16 May, 2015
I have a PDF form on my server that I send to a user via e-mail after they have completed the form. I originally set this up months ago following the guidance in this post - http://www.chronoengine.com/forums/posts/f5/t95602/send-attachment-with-email.html?hilit=attachment+files

Everything worked great until just recently. Now when the user submits the form everything just seems to hang. If I remove the file attachment from the e-mail event on the setup tab, then everything about the form works successfully. If I add the file attachment field name back to the e-mail it hangs again.

I have a custom code event on the setup tab that contains the following

<?php
$form->files["MHPO"]["path"] = "/home/minmatchadmin/public_html/documents/The Minister Hiring Process Overview.pdf";
?>


On e-mail event under "Attachment Files" it just says MHPO

What am I missing?
GreyHead 16 May, 2015
Hi MinMatch,

Please try renaming the PDF file without spaces for example to The_Minister_Hiring_Process_Overview.pdf. Has that name been changed at some point?

Bob
MinMatch 16 May, 2015
Thanks Bob,

I tried removing all spaces in the name but no luck. I applied an update for the latest Chronoform but no changes to the PDF itself.

Don
Max_admin 17 May, 2015
Are you sure the file path still exists ? please try this code:

<?php
pr(file_exists("/home/minmatchadmin/public_html/documents/The Minister Hiring Process Overview.pdf"));


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MinMatch 17 May, 2015
Hi Max,

I've verified the file path numerous times and can substitute another file from the same location and everything works. I'm starting to suspect the size of the file I'm trying to e-mail. The PDF is 5.3 MB. Any ideas why that would be giving me a problem? As I said at the start of this post, it was all working fine at one point. I had not made any changes to the PDF since it first started working earlier...

Don
Max_admin 19 May, 2015
Hi Don,

If another file from the same location works then it must be a problem with this file, try to check the server's error log for any clues, or if you think the file size is an issue then try to ask the host admin if there are any limits on this.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.