Skip to main content

Send an email using the Mailer module from an ActiveCampaign automation

Overview

The sending of an email to an ActiveCampaign contact, using an alternative SMTP service rather than ActiveCampaign, is achieved using a webhook within an ActiveCampaign automation.

The webhook URL used will inform the ActiveMember360 Mailer module to send an email using your chosen SMTP gateway and desired ActiveCampaign email template. It will also determine what happens if the contact (email recipient) clicks the unsubscribe link in the email.

Usage

The URL used for the ActiveCampaign automation webhook is constructed using URL segments and parameters.

A sample of the URL structure required is as follows:

site_url/mbr/mailer/v1/security_code/?template=xx

See Examples for example use cases.

How to use the Mailer URL with an ActiveCampaign automation webhook is explained at How can I send a webhook in an automation?

Note

By default the ActiveMember360 Mailer module will only send emails to contacts who are subscribed into at least one ActiveCampaign list.

URL Segments & Parameters

URL SegmentDescription
site_urlThe WordPress site URL where the ActiveMember360 Mailer module is enabled. This can be found in WordPress, Settings, General, Site URL. It must be specified exactly as shown there.
Default: none.
Required: yes.
mbr/mailer/v1The URL segment to link to the ActiveMember360 Mailer module. It must be specified exactly as shown.
Default: none.
Required: yes.
security_codeThe security code used to validate the sending of email. A security code which must be configured and used in place of security_code can be defined in ActiveMember360, Settings, Security, Security Codes.
Default: none.
Required: yes.
ParametersDescription
templateThe ActiveCampaign email template ID to be used for sending the email. The ID can be determined as explained in Configure and identify an ActiveCampaign Email Template for use with the Mailer module.
Default: none
Required: yes.
gatewayThe SMTP gateway ID from which the email should be sent as defined and enabled in Mailer, Gateways.
If you have multiple gateways defined and enabled and you want send emails randomly using any gateway set this gateway parameter to random.
Default: If no gateway parameter is specified the default gateway is used i.e. first gateway listed in Mailer, Gateways.
Required: no.
optoutOne or more ActiveCampaign list ID’s from which the contact (email recipient) will be unsubscribed if they click on the unsubscribe link within the sent email. If more than one is entered, please separate with commas.
If you have multiple lists and want the contact (email recipient) unsubscribed from all lists if they click on the unsubscribe link within the sent email set this optout parameter to all.
Default: If no optout parameter is specified the contact (email recipient) will be unsubscribed from all lists if they click on the unsubscribe link within the sent email.
Required: no.
forceWill force the email to be sent to the ActiveCampaign contact even if they are not subscribed to any ActiveCampaign lists. The use of this parameter is not recommended but available for special circumstances.
Default: none.
Required: no.

Examples

This URL can be used for a webhook within an ActiveCampaign automation to send an email using the default SMTP gateway as specified in Mailer, Gateways using the ActiveCampaign template with the id of 53. The email will only be sent if the recipient is subscribed to at least one of the ActiveCampaign lists. If the recipient clicks on the unsubscribe link in the email they will be unsubscribed from all ActiveCampaign lists:

https://yoursite.com/mbr/mailer/v1/security_code?template=53
Important

In all examples security_code must be replaced by a security code defined in ActiveMember360, Settings, Security, Security Codes