. . .

Emailing

ApiOmat sends eMails automatically during several events. By default, all emails are sent as plain text, whereas the used SMTP server and some static content can be configured in detail. For more appealing and customized emailing, Mandrill can be used.

Plaintext Emailing

ApiOmat supports sending emails internally using an arbitray SMTP server. First of all, a valid SMTP server has to be configured in apiomat.yaml file using the following settings:

apiomat.yaml
common:
emails:
# the email's sender address ("from") used to send admin emails
admin: admin@apiomat.com
# the support-email address (e.g. used as sender for "forgot password"-requests)
support: support@apiomat.com
# the noreply-email address
noreply: noreply@apiomat.com
# the message footer for emails if not sent over mandrill
footer:
# debug option to print verbose information during email sending
debug: true
# Hostname of the SMTP server
host: localhost
# Username if authentication on SMTP server is necessary
#user:
# Password if authentication on SMTP server is necessary
#password:
# Port of the SMTP server
port: 25
# TRUE if authentication is needed in SMTP server
useAuth: false
# TRUE if SSL connection should be used
useSsl: false
# TRUE if STARTTLS should be used
useStarttls: false

The admin, support and noreply keys are related to the sender displayed in the receivers email. A footer can be set as a plain text string which will be attached to every email sent.

If the debug option is set to true, the ApiOmat logs will contain much information about the sending process and eventual failure data.

All other settings are related to the SMTP server itself and may be queried from its administrator. An example to use an Office365 mail account may look like follows:

Office365 example
Host=smtp.office365.com
user=<OFFICE365_ACCOUNT_EMAIL>
password=<OFFICE365_ACCOUNT_PASSWOIRD>
port=587
useAuth=true
useStarttls=true

Templated emailing using Mandrill

In contrast to plaintext emailing, the Mandrill emailing tool provides lots of features to design and customize all emails sent by ApiOmat. To enable Mandrill emailing, just set up the api key in apiomat.yaml:

yambas:
...
mandrillApiKey=3TW4CPxHVF2aW1234wn4hh

In your Mandrill account, go to Outbound -> Templates and add a new template for each of the events below using the exact template name in the table. Please fill out all Template Defaults, since ApiOmat won't send default values by its own.

You can use the merge tags stated in the table for each event in the mail text if you surround the tag with *| .. |* .

images/download/attachments/17238265/image2015-6-22-16_43_34.png

Events

New customer signup

Description

Is sent when a new customer has signed up (for internal notification)

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • CUSTOMER_COMPANYNAME = customers company name

  • CUSTOMER_PHONE = customer phone number

  • CUSTOMER_ZIP = customers zip number

  • CUSTOMER_COUNTRY = customers country name

  • CUSTOMER_SOCIALMEDIA = information about social media login

Template name

aom-newcustomer

Customer email verification

Description

Is sent when a customer has confirmed his email address

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

Template name

aom-confirm

Customers email address validation reminder

Description

Is sent each day after a customer signs up; stops when he clicks on the confirmation link. If not confirmed after ten days, the customer gets locked.

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • URL = Confirmation link

  • DAYS_LEFT until account is closed

Template name

aom-verifyemail

Customer password reset

Description

Is sent when a customer forgot his password

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • RESET_URL = URL to reset the password (token based, a new password is displayed after a redirect)

Template name

aom-customerpasswordreset

Customer Password Reminder Message

Description

Is sent when password will expire in a few days

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

Template name

aom-accountpasswordExpirationReminder

Customer Password Expiration Message

Description

Is sent when the password has been expired

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

Template name

aom-accountpasswordExpiration

Customer Account blacklisted Message

Description

Is sent when an account is temporary blacklisted by exceeding maximal login attempts.

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

Template name

aom-accountBlacklisted

User password reset

Description

Is sent when an app user forgot his password

Merge tags

  • RESET_URL = URL to reset the password (token based, a new password is displayed after a redirect)

  • USER_NAME = the name of the user which requested this password-change

  • APP_NAME = the name of the app for which the reset was requested

Template name

aom-userpasswordreset

Application Upgrade order

Description

Is sent when a new payment is created

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • APP_NAME = app name

Template name

aom-order

Application Downgrade warning

Description

Is sent when payment ends in the next 2 days

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • INVOICE_NO = Invoice number as reference

  • APP_NAME = app name

Template name

aom-downgradewarning

Application Downgrade warning (voucher payment)

Description

Is sent when vocher code gets invalid in the next 2 days

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • APP_NAME = app name

Template name

aom-downgradewarningvoucher

Application Downgrade

Description

Is sent when payment was not extended (app is not paid anymore)

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • APP_NAME = app name

Template name

aom-downgrade

Application Downgrade (voucher payment)

Description

Is sent when voucher was not extended (app is not paid anymore)

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • APP_NAME = app name

Template name

aom-downgradevoucher

Application Trial Reminder Message

Description

Is sent when app will expire in a few days

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • APP_NAME = app name

  • DAYS_LEFT until app will expire

  • TRIAL_DAYS whole number of available trial-days

Template name

aom-trialreminder

Application Trial Expiration Message

Description

Is sent when the trial has been expired

Merge tags

  • CUSTOMER_NAME = customers account name

  • CUSTOMER_EMAIL = customer email address

  • APP_NAME = app name

  • TRIAL_DAYS whole number of available trial-days

Template name

aom-trialexpired

* link only available in Enterprise Documentation