Setup example email in Inbound Mailer. Create 2 variations. Setup content etc. Save.
Step 2 - Get Settings JSON
When building the example email use the UI to design/edit it's variations and then use this URL param to output it's settings in json format. An extra array key 'is_sample_email' is added to the json array. You do not need to send the email at all.
&inbound_generate_email_json=true
Step 3 Adding json to upgrade routine
The json text generated by our backend command is placed in the $email_settings variable.
Note * changing the name of the upgrade routine method will prompt the call to action to run the upgrade routine. This is good for testing.
Dummy stats are added automatically
Dummy stats are automatically generated while viewing the email. When preparing stats for a sent or automated email we check to see if the email settings contains 'is_sample_email' and if it does we generate dummy stats for it using the method below instead of attempting to query mandrill for email stats:
Preparing the example email
Step 1 - Setup Email
Setup example email in Inbound Mailer. Create 2 variations. Setup content etc. Save.
Step 2 - Get Settings JSON
When building the example email use the UI to design/edit it's variations and then use this URL param to output it's settings in json format. An extra array key 'is_sample_email' is added to the json array. You do not need to send the email at all.
&inbound_generate_email_json=true
Step 3 Adding json to upgrade routine
The json text generated by our backend command is placed in the $email_settings variable.
https://github.com/inboundnow/inbound-mailer/blob/master/classes/class.activation.database-routines.php#L42-L69
Dummy stats are added automatically
Dummy stats are automatically generated while viewing the email. When preparing stats for a sent or automated email we check to see if the email settings contains 'is_sample_email' and if it does we generate dummy stats for it using the method below instead of attempting to query mandrill for email stats:
https://github.com/inboundnow/inbound-mailer/blob/master/classes/class.statistics.php#L42-L51