Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default attachment to email

    157b

    Would it be a simple task to attach a pdf when sending email, in general, or specifically for the welcome one?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,497
    Plugin Contributions
    88

    Default Re: attachment to email

    There's a notification/global variable from the zen_mail function, present in /includes/functions/functions_email.php:
    Code:
          global $newAttachmentsList;
          $zco_notifier->notify('NOTIFY_EMAIL_BEFORE_PROCESS_ATTACHMENTS', array('attachments'=>$attachments_list, 'module'=>$module), $mail, $attachments_list);
          if (isset($newAttachmentsList) && is_array($newAttachmentsList)) $attachments_list = $newAttachmentsList;
    For your case, where the attachment is sent for the create_account page, I believe the simplest solution would be to create an observer for that event and sets the $newAttachmentsList value, if the $current_page_base is FILENAME_CREATE_ACCOUNT (you'll need to make that variable a global):
    Code:
    $newAttachmentsList = array(
        'file' => DIR_FS_CATALOG . 'name_and_location_of_the.pdf',
        'mime_type' => 'application/pdf'
    );
    That same array value could be set to the $attachments_list parameter coming into the observer, as an alternate solution.

  3. #3
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: attachment to email

    Thank you.
    Will see what I can do, need to study.

 

 

Similar Threads

  1. Welcome Email Attachment
    By eddy_r3 in forum Managing Customers and Orders
    Replies: 9
    Last Post: 22 Jun 2012, 05:11 AM
  2. Attachment in confirmation email.
    By skektek in forum Managing Customers and Orders
    Replies: 3
    Last Post: 16 Oct 2008, 05:08 AM
  3. Add an attachment in order confirm email
    By pierre-henri in forum Managing Customers and Orders
    Replies: 4
    Last Post: 12 Dec 2007, 04:11 PM
  4. Adding email attachment to Contact Us form
    By thebeadyeye in forum General Questions
    Replies: 4
    Last Post: 2 Oct 2007, 08:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR