Campaigns¶
-
class
dotmailer.campaigns.
Campaign
(**kwargs)¶ Required Values name: The name of the campaign being created
subject: The email subject line of the campaign
from_name: The from name of the campaign
- html_content: The HTML content of the campaign that lies between
- the opening <body> and the closing </body> only (the <body> tags themselves should not be used).
plain_text_content: The plain text content of the campaign
Optional Values from_address: The email of an existing custom from address you
wish to use, which needs to be included within the request body- reply_action: The required action to be taken when a reply to the
- campaign is sent by the recipient. Possible values for this attribute are ‘Unset’, ‘WebMailForward’, ‘Webmail’, ‘Delete’
- reply_to_address: The email address that you would like replies to
- be forwarded to, which needs to be included within the request body
-
classmethod
copy
(id)¶ Copies a given campaign, returning the new campaign
Parameters: id – Returns:
-
create
()¶ Create a campaign
Returns:
-
delete
()¶ Deletes a campaign
Returns:
-
classmethod
get_all
()¶ Gets all campaigns
Returns: List of Campaigns
-
send
(when=None, address_book_ids=None, contact_ids=None)¶ Sends a specified campaign to one or more address books, segments or contacts, either as an immediate or scheduled send
Parameters: when – A date time object which should define when the campaign should be sent. If None then it will be sent immediately. :param address_book_ids: :param contact_ids: :return:
-
send_time_optimised
(address_book_ids=None, contact_ids=None)¶ Sends a specified campaign to one or more address books, segments or contacts at the most appropriate time based upon their previous opens.
Parameters: - address_book_ids –
- contact_ids –
Returns:
-
update
()¶ Updates a given campaign
Returns: