View Source Papelillo.MailerList (Papelillo v0.2.2)

Maillist wrapper

Link to this section Summary

Functions

Create a mailing list with the parameters.

Delete a mailing list with the parameters.

Interpolate system environment variables in the configuration.

Parse configs in the following order, later ones taking priority

Subscribe a email account to mailing list with the parameters.

Unsubscribe a email account to mailing list with the parameters.

Update a mailing list with the parameters.

Link to this section Functions

Link to this function

create(name, description, address, config)

View Source

Create a mailing list with the parameters.

Address must be a string without blank spaces and special characters, the domain of the email address is taken from the config.exs definition.

Delete a mailing list with the parameters.

Address must be a string without blank spaces and special characters, the domain of the email address is taken from the config.exs definition.

Link to this function

interpolate_env_vars(config)

View Source

Interpolate system environment variables in the configuration.

This function will transform all the {:system, "ENV_VAR"} tuples into their respective values grabbed from the process environment.

Link to this function

parse_config(otp_app, mailerlist, mailerlist_config, dynamic_config)

View Source

Parse configs in the following order, later ones taking priority:

  1. mix configs
  2. compiled configs in MailerList module
  3. dynamic configs passed into the function
  4. system envs
Link to this function

subscribe(list_name, member, config)

View Source

Subscribe a email account to mailing list with the parameters.

List_name must be a string without blank spaces and special characters, the domain of the email address is taken from the config.exs definition.

Member must have complete email format

Link to this function

unsubscribe(list_name, member, config)

View Source

Unsubscribe a email account to mailing list with the parameters.

List_name must be a string without blank spaces and special characters, the domain of the email address is taken from the config.exs definition.

Member must have complete email format

Link to this function

update(name, description, address, actual_address, config)

View Source

Update a mailing list with the parameters.

Address must be a string without blank spaces and special characters, the domain of the email address is taken from the config.exs definition.

Link to this function

validate_email(email, config)

View Source