Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save steveosoule/94a18bca19d22ded93a0da6990cd1163 to your computer and use it in GitHub Desktop.
Save steveosoule/94a18bca19d22ded93a0da6990cd1163 to your computer and use it in GitHub Desktop.
Manually trigger a preexisting email
<mvt:comment>
Overrides if needed
</mvt:comment>
<mvt:assign name="l.run:on_cust" value="1" />
<mvt:assign name="l.run:override_from" value="''" />
<mvt:assign name="l.run:override_reply_to" value="''" />
<mvt:assign name="l.run:override_to" value="''" />
<mvt:assign name="l.run:override_cc" value="''" />
<mvt:assign name="l.run:override_bcc" value="''" />
<mvt:assign name="l.run:override_subject" value="''" />
<mvt:comment>
Load Customer
</mvt:comment>
<mvt:do file="g.Module_Feature_CUS_DB" name="l.Customer_Load_ID" value="Customer_Load_ID( g.Customer_ID, l.run:customer )" />
<mvt:comment>
Load email
</mvt:comment>
<mvt:do file="g.Module_Root $ '/modules/fulfill/templateorderemails.mvc'" name="l.TemplateOrderEmail_Load_Code" value="TemplateOrderEmail_Load_Code( 'EXAMPLE_EMAIL', l.email )" />
<mvt:comment>
Send email
</mvt:comment>
<mvt:do file="g.Module_Root $ '/modules/fulfill/templateorderemails.mvc'" name="l.TemplateOrderEmails_SendEmail" value="TemplateOrderEmails_SendEmail( l.run, l.email )" />
<mvt:comment>
Overrides if needed
</mvt:comment>
<mvt:assign name="l.run:override_from" value="''" />
<mvt:assign name="l.run:override_reply_to" value="''" />
<mvt:assign name="l.run:override_to" value="''" />
<mvt:assign name="l.run:override_cc" value="''" />
<mvt:assign name="l.run:override_bcc" value="''" />
<mvt:assign name="l.run:override_subject" value="''" />
<mvt:comment>
Load Order
</mvt:comment>
<mvt:do file="g.Module_Library_DB" name="l.success" value="Order_Load_ID(g.Order_ID, l.run:order)" />
<mvt:comment>
Load email
</mvt:comment>
<mvt:do file="g.Module_Root $ '/modules/fulfill/templateorderemails.mvc'" name="l.success" value="TemplateOrderEmail_Load_Code('EMAIL_PAGE_CODE_WITHOUT_TEMPLATE', l.email_template)" />
<mvt:comment>
Send
</mvt:comment>
<mvt:do file="g.Module_Root $ '/modules/fulfill/templateorderemails.mvc'" name="l.success" value="TemplateOrderEmails_SendEmail(l.run, l.email_template)" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment