Version

1.1.2.16.2.12.2.41 (checked in on 2008/04/25 at 12:18:47 by gordon)

Description

@author Sammy Spets thanks to Synerger Pty Ltd, Australia (http://synerger.com) ec_mail Centralised mail system for e-Commerce so emails are no longer difficult to code or manage.

@todo: mail add, update, delete events exposed through ecmail hook?

Constants

Namesort iconDescription
ECMAIL_NAMELEN
ECMAIL_SUBJECTLEN

Functions

Namesort iconDescription
A very special beast that gets around FAPI not having element specific submit functions. The form_id is stored along with variable names with successive calls. These are then passed through to ec_mail_form_alter() so it can add a submit hook with the...
ec_mail_convert_tokensConverts mail tokens in the given string using both default conversions and specific conversions passed in.
ec_mail_deleteDeletes the given mail. This function assumes that the mail given is not referenced. If it is, this function will spit out an error and call exit().
ec_mail_delete_allDeletes all mails of the given type or all mails (CAREFUL!).
ec_mail_delete_all_formDeletes all mails of the given type or all mails (CAREFUL!).
ec_mail_delete_all_form_submitDeletes all mails of the given type or all mails (CAREFUL!).
ec_mail_delete_confirm
ec_mail_delete_confirm_form
ec_mail_delete_confirm_form_submit
ec_mail_delete_confirm_form_validate
ec_mail_ec_permImplementation of hook_ec_perm().
ec_mail_edit_formForm API code for displaying the mail add/update form.
ec_mail_edit_form_submitCommits mail fields supplied by the user.
ec_mail_edit_form_validateValidates the mail add/edit form.
ec_mail_form_alterImplementation of hook_form_alter().
ec_mail_get_listReturns an array of all mails ready for use in a select form element.
ec_mail_get_midReturns the mid for the mail with name $name. If there are more than one mail with the same name the behaviour is undefined. Returns false if the name is not found.
ec_mail_get_nameReturns the name of the given mail.
ec_mail_get_numrefsReturns the number of references for the given mail.
ec_mail_get_tableReturns mails stored in the system as an array of rows. Each row can be optionally manipulated by the supplied row function to alter the resulting set.
ec_mail_get_transaction_addressReturns the mail address of the user that purchased the transaction given.
ec_mail_get_type
ec_mail_get_typesReturns the mail types currently available in the system.
ec_mail_implementor_listReturns a list of type => module_name pairs for the given types. If no types are given all pairs are returned for the currently installed module set.
ec_mail_import_old_mailImports mail from variables into the new mail subsystem.
ec_mail_load_mailLoads the given mail from the database.
ec_mail_load_mail_by_nameLoads the mail with the given name from the database. If more than one mail has the same name the behaviour of this function is undefined.
ec_mail_load_mail_for_sendReturns an array (keys are subject, body, from) containing the given mail with substitutions applied to both the subject and the body.
ec_mail_menuImplementation of hook_menu().
ec_mail_module_from_typeReturns the module responsible for the given mail type.
ec_mail_previewReturns a HTML preview of the email to be sent.
ec_mail_preview_arrayReturn a HTML preview of the email to be sent from the mail array()
ec_mail_refaddIncrements reference count for the given mail.
ec_mail_refdelDecrements reference count for the given mail.
ec_mail_reset_to_defaultsResets the given mails to their defaults given by the implementing module. This function calls the hook_mail_reset() implementation in the module.
ec_mail_rowfn_settings
ec_mail_saveSaves the given mail.
ec_mail_selection_formBuilds a selection form element for selecting a mail using the values given.
ec_mail_selection_form_for_variableBuild a selection form element for selecting a mail of a given type to set a variable of the given name.
ec_mail_selection_submitAdjusts reference counts for mail IDs stored in all variables given. This function is automatically called upon the submission of a settings form that is using a mail selection list from ec_mail. This function is added to the form by...
ec_mail_send_mailSends the mail given in the array $mail. $mail must have the following keys: to, from, subject, body, type. Type is required for the call to drupal_mail().
ec_mail_send_midSends the given mail to the address. Prior to sending a substitutions are made on the tokens in both the subject and body with values from the given object.
ec_mail_send_varmail_add_preview
ec_mail_send_varmail_formReturns a form array of a mail editing form. Through this form user's can modify the default mails, preview their changes and send the mail. The mail subject and content have tokens automatically substituted by values in $object according to the...
ec_mail_send_varmail_form_validate
ec_mail_show_tokensShows a page displaying mail tokens. If the mail type is an empty string a list of mail types is displayed.
ec_mail_simpletest
ec_mail_tableDisplays a table of mails currently stored in the system.
ec_mail_valid_email_address
ec_mail_variable_changeAdjusts mail reference counts for the old and new selections for a variable. This function must be called BEFORE variable_set() is called.
ec_mail_varmail_substitutions
ec_mail_view_preview
theme_mail_preview
_ec_mail_get_token_type
_ec_mail_refmodModifies the reference counts for the given mail. The reference count is incremented or decremented by one using the given operator (+ or -). Any module using this should always have one call to ec_mail_refadd() and one call to ec_mail_refdel().