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.
Bookmarks