Email Service

Send email alerts and notifications with your Murano solution.

Your Murano plan provides you a limited amount of free emails for evaluation purposes. If your solution requires additional emails, consider setting up your own SMTP relay server.

You can check your current usage with the getSettings operation.
Before you can use this service, you need to add your email credentails in the service configuration. You can refer to the "configuration" section in following doc for instructions of setting your service configuration - http://docs.exosite.com/reference/ui/send-notifications/.

Operations

Email

Settings

Operations

Email


send

Send an email message.
If the connection.server attribute is omitted, a limited amount of emails per day are allowed depending on your Murano plan and the email sender is automatically set to mailrelay@exosite.com email address.

Arguments
parameters - object - Object containing service call parameters.
Name Type Description
cc [ string(email) ] Carbon copy destination(s) email address(es)
to [ string(email) ] Destination(s) email address(es)
bcc [ string(email) ] Blind carbon copy destination(s) email address(es)
from string(email) Sender email address, only available when specifying an SMTP relay server with connection.server.
Default: "mailrelay@exosite.com"
html string(html) Email message in HTML format
text string Email message text
subject string {..78} Email subject
connection object An SMTP connection information to avoid daily limitation and sender email restriction. Gmail user will need to activate the "lesssecureapps" mode on https://support.google.com/accounts/answer/6010255.
connection.port integer The SMTP server port
connection.user ^[^\s-]+$ The SMTP server account
connection.scheme "smtp", "smtps" The SMTP server
Default: "smtp"
connection.server string(hostname) The SMTP server host name
connection.password ^[^\t\r\n\f-]*$ The SMTP server password
Responses
Email transmission details - object
Name Type Description
accepted [ string(email) ] List of destination emails
envelope object Email envelope details
rejected [ string(email) ] List of rejected destination emails
response string Response from smtp server
messageId string Unique message Id
Daily email quota reached. Consider adding your personal SMTP server or contact Murano team for upgrading your plan. You can view your current email usage with getSettings operation or on your Murano portal account. - nil

Daily email quota reached. Consider adding your personal SMTP server or contact Murano team for upgrading your plan. You can view your current email usage with getSettings operation or on your Murano portal account.

Error response - object
Name Type Description
type string Error type
error string Error message
status integer Response code
Example
local emailData = {
  from = "me@myemail.com",
  to = {
    "destination1@email.com",
    "destination2@email.com",
  },
  subject = "Hello",
  text = "World",
  html = "<p><b>World</b></p>",
  connection = {
    server = "smtp.myemail.com",
    port = 1234,
    user = "me",
    password = "mysecret"
  }
}
local result = Email.send(emailData)

Settings


getSettings

Get email settings, current usage, and quota. Detailed error is available in the service response.

Responses
Usage and settings information - object
Name Type Description
quota object Free Email quota limitation for this solution.
quota.daily integer Daily quota, reset midnight UTC time.
usage object Current email usage for this solution.
usage.daily integer Daily usage, reset midnight UTC time. This value will not increase if you use your own SMTP server.
Error response - object
Name Type Description
type string Error type
error string Error message
status integer Response code
Example
local result = Email.getSettings()
print("I am using " .. result.usage.daily .. " out of my " .. result.quota.daily .. " free daily emails.")