Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Search the Community

Showing results for tags 'sendattachment'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News and Announcements
    • News and Announcements
  • osCommerce v4.x
    • General Support
    • Migration from old osCommerce
    • Design and Templates
    • Apps / Add-ons
    • Translations
    • API and import/export
    • Marketplace integration
    • Manuals and How-to
    • Blog's discussion
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Commercial Support Inquiries
    • Developer Feedback

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Real Name




Found 1 result

  1. Hi, Because I'd like to send emails to customers with files attached (doing from Administrator). And later on, to enhance my website giving the customers the opportunity to send me mails with attachments, I though to start by having the Add-On number (4583) (http://addons.oscommerce.com/info/4583) Although a simple Add On it works partially on my OSC 2.3.1. ... It sends the message but without the attachment. Despite I feel confident enough to do small coding, I'm not an expert in the subject. I would appreciate to have some advice from the experts in this forum about what could be wrong. In my 'future' website, to let the customers send information back to our designers, is a very useful functionality. So I will appreciate all your help on this simple stuff. I spend a whole day digging on this but....without success :-( This Add-On modifies the catalog\admin\mail.php file. The code updated to let send the attachment is: $from = tep_db_prepare_input($HTTP_POST_VARS['from']); $subject = tep_db_prepare_input($HTTP_POST_VARS['subject']); $message = tep_db_prepare_input($HTTP_POST_VARS['message']); //Let's build a message object using the email class $mimemessage = new email(array('X-Mailer: osCommerce')); if ($_FILES['userfile']['size'] > 0) { $attachment_name = $HTTP_POST_FILES['userfile']['name']; $attachment_type = $HTTP_POST_FILES['userfile']['type']; //$attachment_size = $HTTP_POST_FILES['userfile']['size']; //Just in case you want to check and limit the size new upload('userfile', DIR_FS_DOWNLOAD); $attachment_file = DIR_FS_DOWNLOAD . $attachment_name; $attachments = $mimemessage->get_file($attachment_file); $mimemessage->add_attachment($attachments, $attachment_name, $attachment_type); } // Build the text version $text = strip_tags($message); if (EMAIL_USE_HTML == 'true') { $mimemessage->add_html($message, $text); } else { $mimemessage->add_text($message); } $mimemessage->build_message(); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject); } tep_redirect(tep_href_link(FILENAME_MAIL, 'mail_sent_to=' . urlencode($mail_sent_to))); I've also attached to this message the whole mail.php I use. Thank-you very much in ahead of time.
  • Create New...