View Source Infusionsoft.Endpoints.XML.Email (Infusionsoft v0.8.1)

Provides the raw endpoints to Infusionsoft's XML API for Email actions.

Summary

Functions

create_email_template(template_name, categories, from_address, to_address, cc_address, bcc_address, subject, text_body, html_body, content_type, merge_context, token, app \\ nil)

@spec create_email_template(
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-create-an-email-template

opt_in_an_email_address(email, opt_in_reason, token, app \\ nil)

@spec opt_in_an_email_address(String.t(), String.t(), String.t(), nil | String.t()) ::
  {:ok, boolean()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-opt-in-an-email-address

opt_out_an_email_address(email, opt_out_reason, token, app \\ nil)

@spec opt_out_an_email_address(String.t(), String.t(), String.t(), nil | String.t()) ::
  {:ok, boolean()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-opt-out-an-email-address

retrieve_email_template(template_id, token, app \\ nil)

@spec retrieve_email_template(integer(), String.t(), nil | String.t()) ::
  {:ok, map()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-retrieve-an-email-template

retrieve_opt_in_status(email, token, app \\ nil)

@spec retrieve_opt_in_status(String.t(), String.t(), nil | String.t()) ::
  {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-retrieve-an-email-s-opt-in-status

Returns an integer value of 0 for opt out / non-marketable / soft bounce / hard bounce, 1 for single opt-in, or 2 for double opt-in.

send_an_email(contact_list, from_address, to_address, cc_addresses, bcc_addresses, content_type, subject, html_body, text_body, token, app \\ nil)

@spec send_an_email(
  [integer()],
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  nil | String.t()
) :: {:ok, boolean()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-send-an-email

send_from_template(contact_list, template_id, token, app \\ nil)

@spec send_from_template([integer()], integer(), String.t(), nil | String.t()) ::
  {:ok, boolean()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-send-an-email-from-a-template

update_email_template(template_id, template_name, categories, from_address, to_address, cc_address, bcc_address, subject, text_body, html_body, content_type, merge_context, token, app \\ nil)

@spec update_email_template(
  integer(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  nil | String.t()
) :: {:ok, integer()} | {:error, String.t()}

https://developer.infusionsoft.com/docs/xml-rpc/#email-update-an-email-template