ryanf Posted June 11, 2004 Share Posted June 11, 2004 Hey there. I am creating a page where the user can upload an image, fill out a form then when they hit submit, it will email me with the file attached. I am doing this so they customers can create custom jobs. The only thing I can't figure out is how to attach the file. I know there is a function in includes/classes/email called function add_attachment that will do it but how do i integrate that with function tep_mail in includes/functions/general? Thanks for the help! Ryan If I was crafty, this would be a funny signature. Link to comment Share on other sites More sharing options...
ryanf Posted June 11, 2004 Author Share Posted June 11, 2004 ANyone know this? I am been working on it all day and I can't even get the file to upload :( I am trying this code: if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $from_email = tep_db_prepare_input($HTTP_POST_VARS['from_email']); $email_subject = 'Custom Order Enquiry from Website'; $email_address = '[email protected]'; $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_db_prepare_input($HTTP_POST_VARS['custom_image'])) { $filename = explode('\\\\', $HTTP_POST_VARS['custom_image']); $i = 0; while ($filename[$i]){ $i++; } $image = new upload('custom_image'); $image->set_destination('/temp/'); $image->set_filename($filename[$i-1]); } if (tep_validate_email($from_email)) { tep_mail(STORE_OWNER, $email_address, $email_subject, $enquiry, $name, $from_email, $image, $image->filename, 'application/image'); tep_redirect(tep_href_link(FILENAME_CUSTOM, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } I am made adjustments to the general.php and email.php as per this thread. Anyone done this before? Whats my deal? Thanks! Ryan If I was crafty, this would be a funny signature. Link to comment Share on other sites More sharing options...
Farnastic Posted June 11, 2004 Share Posted June 11, 2004 Hi Ryan, I know what you want, but not how. The upload will be after order completion, before, or in the middle? Why don't use a file upload script and get the file in your server? Do you have a link for this? thanks far Link to comment Share on other sites More sharing options...
ryanf Posted June 11, 2004 Author Share Posted June 11, 2004 Hey, its actually totally separate from the order process. I dont care how it gets done as long as it gets done. If you have any ideas please let me know. here is the page I am trying to get it to work on: www.abdulky.com/custom.php If I was crafty, this would be a funny signature. Link to comment Share on other sites More sharing options...
agiftcodotcom Posted June 11, 2004 Share Posted June 11, 2004 I have no idea if THIS will help, but let us know. Contributions I used : Updated 06-13-04 23:42 ---------------- Vote on My Graphis Poll Link to comment Share on other sites More sharing options...
ryanf Posted June 14, 2004 Author Share Posted June 14, 2004 Thanks for the info eric. I read over it yet I don't really know how to use it in my site. I alread thought my page was handling uploads like that. Does anyone know how to get this working? If I was crafty, this would be a funny signature. Link to comment Share on other sites More sharing options...
Farnastic Posted June 14, 2004 Share Posted June 14, 2004 Ryan, Wait 'til this afternoon. I have the files you need, but unfortunally is at home. It is working in my websites. You can try this demo, but you need to register, don't worry, select fax credit card info as payment and at order confirmation is the link. http://www.apadirect.com/demo/ I will e-mail you the file tonight. thanks far Link to comment Share on other sites More sharing options...
ryanf Posted June 14, 2004 Author Share Posted June 14, 2004 Great, thanks a lot Far! I will be looking forward to recieving them! Ryan If I was crafty, this would be a funny signature. Link to comment Share on other sites More sharing options...
Farnastic Posted June 15, 2004 Share Posted June 15, 2004 Ryan, Email sent thanks far Link to comment Share on other sites More sharing options...
ryanf Posted June 15, 2004 Author Share Posted June 15, 2004 Hey Far, where'd you send the email? I didn't get anything. If I was crafty, this would be a funny signature. Link to comment Share on other sites More sharing options...
duddy6600 Posted July 15, 2004 Share Posted July 15, 2004 hi Far, I am also trying to figure out similar problem. Could u share the module in this forum, pleeaseee... :) Link to comment Share on other sites More sharing options...
Farnastic Posted July 16, 2004 Share Posted July 16, 2004 hi dudi, I need your email to send the files. thanks far Link to comment Share on other sites More sharing options...
AussieGirl Posted December 27, 2004 Share Posted December 27, 2004 I would like to add thumbnail size images of the photos as attachments to emails sent to customers and the shop. Can anyone help me with this? Regards AussieGirl Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.