ZenMagick 0.9.8


Functions


Function Summary
string

zm_email_formats(string template)

Check in which format a given email template exists.

string

zm_get_email_contents(string template, boolean asHTML, array context)

Create email contents based on the given parameter.

void

zm_mail(string subject, string template, array context, string toEmail, string toName, string fromEmail, string fromName, string attachment)

Send email.

Function Detail

\store\email.php at line 52

zm_email_formats

public string zm_email_formats(string template)

Check in which format a given email template exists.

Parameters:
template - The email template name.
Returns:
Valid return strings are: html, text, both or none.

\store\email.php at line 38

zm_get_email_contents

public string zm_get_email_contents(string template, boolean asHTML, array context)

Create email contents based on the given parameter.

Parameters:
template - The template.
asHTML - Flag whether HTML or text version should be generated.
context - The context data to be made available for the email template.
Returns:
The email contents.

\store\email.php at line 87

zm_mail

public void zm_mail(string subject, string template, array context, string toEmail, string toName, string fromEmail, string fromName, string attachment)

Send email.

Contents generation is delegated to a ZMEmailView.

The environment will be se same as for the actual HTML response view. This is done by attaching the current controller to the view.

Parameters:
subject - The subject.
template - The email template name.
context - Additional stuff to be made available to the template.
toEmail - The recipients email address.
toName - Optional recipients name; default is $toEmail.
fromEmail - Optional sender email address; default is storeEmailFrom.
fromName - Optional sender name; default is $fromEmail.
attachment - Optional single file attachment.

ZenMagick 0.9.8