E-mail notifications

email

e-mail notification used by z_email and z_email_server.

Type:
first

Return:

#email{} properties:
  • to: list
  • cc: list
  • bcc: list
  • from: list
  • reply_to: unknown
  • headers: list
  • body: unknown
  • raw: unknown
  • subject: unknown
  • text: unknown
  • html: unknown
  • text_tpl: unknown
  • html_tpl: unknown
  • vars: list
  • attachments: list
  • queue: boolean

email_add_handler

Add a handler for receiving e-mail notifications

Type:
first
Return:
{ok, LocalFrom}, the unique localpart of an e-mail address on this server.
#email_add_handler{} properties:
  • notification: unknown
  • user_id: unknown
  • resource_id: unknown

email_bounced

Bounced e-mail notification. The recipient is the e-mail that is bouncing. When the the message_nr is unknown the it is set to ‘undefined’. This can happen if it is a “late bounce”. If the recipient is defined then the Context is the depickled z_email:send/2 context. (notify)

Type:
first

Return:

#email_bounced{} properties:
  • message_nr: binary
  • recipient: undefined|binary

email_drop_handler

Drop an e-mail handler for a user/resource id. (notify). The notification, user and resource should be the same as when the handler was registered.

Type:
first

Return:

#email_drop_handler{} properties:
  • notification: unknown
  • user_id: unknown
  • resource_id: unknown

email_ensure_handler

Add a handler for receiving e-mail notifications

Type:
first
Return:
{ok, LocalFrom}, the unique localpart of an e-mail address on this server.
#email_ensure_handler{} properties:
  • notification: unknown
  • user_id: unknown
  • resource_id: unknown

email_failed

Notify that we could NOT send an e-mail (there might be a bounce later...) The Context is the depickled z_email:send/2 context.

Type:
notify

Return:

#email_failed{} properties:
  • message_nr: binary
  • recipient: binary
  • is_final: boolean
  • reason: retry|illegal_address|smtphost|error
  • status: binary

email_received

Notification sent to a site when e-mail for that site is received

Type:
first

Return:

#email_received{} properties:
  • to: unknown
  • from: unknown
  • localpart: unknown
  • localtags: unknown
  • domain: unknown
  • reference: unknown
  • email: unknown
  • headers: unknown
  • is_bulk: boolean
  • is_auto: boolean
  • decoded: unknown
  • raw: unknown

email_sent

Notify that we could NOT send an e-mail (there might be a bounce later...) The Context is the depickled z_email:send/2 context.

Type:
notify

Return:

#email_sent{} properties:
  • message_nr: binary
  • recipient: binary
  • is_final: boolean

email_status

Email status notification, sent when the validity of an email recipient changes

Type:
notify

Return:

#email_status{} properties:
  • recipient: binary
  • is_valid: boolean
  • is_final: boolean