The
is used to generate mail content using the API. will be to generate personalized previews of trigger mailings. trigger mails using a different mail sender. enormously.
The
is used to generate mail content using the API. The main use of the class will be to generate personalized previews of trigger mailings. The class can also be used to generate and send single trigger mails using a different mail sender. Be aware that in this case the mail sending rate would decrease enormously. To preview a trigger mailing, take a
from the com.inxmail.xpro.api.triggermailing.TriggerMailingManager. Each mailing needs to be parsed before building it. The following snippet shows how to build a trigger mail for a given recipient:
$oRenderer = $oSession->getTriggerMailingManager()->createRenderer();
$oRenderer->parse( $iMailingId, Inx_Api_TriggerMail_BuildMode::ALTERNATIVEVIEW_ACTIVE() );
$oContent = $oRenderer->build( $iRecipientId );
can handle the following different build modes:
- PREVIEW - Trackable links will not trigger any events, unsubscription links will redirect but
not unsubscribe anybody. Embedded images are replaced with http references to image resources on the Inxmail server.
- ALTERNATIVEVIEW_ACTIVE - All links are fully functional. Embedded images are replaced with http
references to image resources on the Inxmail server.
- ALTERNATIVEVIEW_INACTIVE - All links are not functional. Embedded images are replaced with http
references to image resources on the Inxmail server.
- NORMAL - The mail is rendered, ready to be sent.
- ARCHIVE - Trackable links will not trigger any events, unsubscription links will redirect but
not unsubscribe anybody. Embedded images are replaced with http references to image resources on the Inxmail server.
- ALTERNATIVEVIEW_ACTIVE_SIMPLE_LINKS - All links are fully functional but converted to simple
links. Embedded images are replaced with http references to image resources on the Inxmail server.
- NEWSLETTER_SIMPLE_LINKS - The same as above, but the function InInboxView returns true.
<strong>Note:</strong> A
object <strong>must</strong> be closed once it is not needed anymore to prevent memory leaks and other potentially harmful side effects.
Located in /Api/TriggerMail/TriggerMailingRenderer.php (line 50)