ecl-logo Documentation

Email

Email[recipients]emailResult

sends an email to recipients.

Details

  • Email send requests will only be submitted to the server if the current session is against the production ECL database.
  • Email requests with Template specified will use SendGrid templates to produce richly formatted emails.
  • Template field options longer than 7000 characters will be truncated to avoid exceeding the SendGrid max size of 10000 bytes per substitution.
  • If the Headline option is not specified for a 'general-message' email (free text), the value of the Subject option will be used.
  • The following options are expected in particular combinations depending on the specified Template option. Each template requires a specific set of fields, as specified below:
  • Template name
    Template description
    Options required
    admin-addedAnnounces addition of a new administrator torom a team.{UserName, TeamName}
    ecl-inviteAnnounces that a user has been invited to the ECL.{UserName, TeamName}
    ecl-welcomeWelcomes a new user to the ECL.{URL}
    general-messageA generic template for any free-text email.{Headline, Message}
    materials-requiredAnnounces that additional non-stocked materials are required to run a protocol.{Notebook, SectionDetails, MaterialsObjects}
    model-approvedAnnounces that a user-created model has been approved for use.{Notebook, SectionDetails, ModelObject}
    product-approvedAnnounces that a user-created product has been approved for use.{Notebook, SectionDetails, ProductObject}
    notebook-addedAnnounces that a notebook has been added to a team.{Notebook, TeamName}
    notebook-removedAnnounces that a team no longer has access to a notebook.{Notebook, TeamName}
    order-backorderedAnnounces that an order has been marked as backordered by the supplier.{Notebook, SectionDetails, TransactionObject, DateExpected}
    order-canceledAnnounces that an order has been canceled.{Notebook, SectionDetails, TransactionObject}
    order-placedAnnounces that an order has been placed.{Notebook, SectionDetails, TransactionObject}
    order-receivedAnnounces that an order has been received and is ready for use.{Notebook, SectionDetails, TransactionObject}
    protocol-abortedAnnounces that a protocol's execution has been aborted.{Notebook, SectionDetails, ProtocolObject, AuthorName, TroubleshootingHeadline}
    protocol-added-to-cartAnnounces that a protocol has been added to a team's cart.{Notebook, SectionDetails, ProtocolObject, AuthorName}
    protocol-canceledAnnounces that a protocol has been canceled by the user.{Notebook, SectionDetails, ProtocolObject, AuthorName}
    protocol-completedAnnounces that a protocol's execution has been completed.{Notebook, SectionDetails, ProtocolObject, AuthorName}
    protocol-enqueuedAnnounces that a protocol has been added to the execution queue.{Notebook, SectionDetails, ProtocolObject, AuthorName}
    protocol-processingAnnounces that execution of a protocol has begun in the lab.{Notebook, SectionDetails, ProtocolObject, AuthorName}
    samples-returnedAnnounces that a shipment of user samples has been sent from ECL.{Notebook, SectionDetails, TransactionObject, UserName, TrackingNumber, URL}
    samples-shippedAnnounces that a user has notified ECL of an incoming shipment of samples.{Notebook, SectionDetails, TransactionObject}
    software-new-featuresAnnounces the addition of new features to the ECL.{FeatureDescription}
    software-updateAnnounces that one of the ECL applications has been updated to a new version.{Application, VersionNumber, FeatureDescription, URL}
    team-member-addedAnnounces that a new member has been added to a team.{UserName, TeamName}
    team-member-removedAnnoucnes that a member has been removed from a team.{UserName, TeamName}
    troubleshooting-reportedAnnounces that a troubleshooting report has been filed for a protocol.{Notebook, SectionDetails, ProtocolObject, AuthorName, TroubleshootingObject, TroubleshootingHeadline, TroubleshootingDescription}
    troubleshooting-report-reopenedAnnounces that a previously completed troubleshooting report has been reopened.{Notebook, SectionDetails, ProtocolObject, AuthorName, TroubleshootingObject, TroubleshootingHeadline, TroubleshootingDescription}
    troubleshooting-report-resolvedAnnounces that a troubleshooting report has been resolved.{Notebook, SectionDetails, ProtocolObject, AuthorName, TroubleshootingObject, TroubleshootingHeadline, TroubleshootingDescription}
    troubleshooting-report-updatedAnnounces new activity (ECL staff comments or actions) on an open troubleshooting report.{Notebook, SectionDetails, ProtocolObject, AuthorName, TroubleshootingObject, TroubleshootingHeadline, TroubleshootingDescription}
  • Input
    Output
    TemplateEmail Options
    General Options
    Messages
  • AttachmentFileDoesNotExistThe attached file(s) `1` does not exist. Please check the file path provided and try again.
    AttachmentFileTypeNotSupportedThe attached file(s) `1` is not supported. Please check the list of supported file types by calling SupportedEmailAttachmentTypeP.
    IncompleteTemplateFieldsThe specified email template, '`2`', requires non-Null values for the options `1`, but one or more of these options is Null: `3`. Please verify that all of the required information has been provided.
    InvalidTemplateThe specified email template, '`1`', is not a valid email template name. Please confirm that the provided email template matches EmailTemplateNameP.
    MailServerErrorThe server returned an error in response to the request to send email: `1`. Please confirm that specified input includes all required information and is formatted properly.

Examples

Basic Examples  (3)

Send an Email with an explicit Email address:

Send an Email referencing an ECL User Object:

Send an email to multiple recipients:

Additional Examples  (2)

Send an email to multiple recipients referenced by ECL User Object:

Send an email to multiple recipients using a mixture of email addresses and ECL User Objects:

Options  (32)

AffectedItem  (1)

Specify the item that is the subject of the troubleshooting report associated with the notification:

Application  (1)

Specify the ECL application associated with the notification:

Attachments  (1)

Add an attachment to the email:

AuthorName  (1)

Specify the name of the author associated with the notification:

Bcc  (1)

Send an Email and Bcc some else:

Cc  (1)

Send an Email and Cc some else:

DateExpected  (1)

Specify the expected ship date of the order associated with the notification:

FeatureDescription  (1)

Specify the description of the feature associated with the notification:

Headline  (1)

Specify the headline of a free-text email:

MaterialsObjects  (1)

Specify the product objects corresponding to materials associated with the notification:

Message  (1)

Specify the body of a free-text email:

ModelObject  (1)

Specify the model object associated with the notification:

Notebook  (1)

Specify the laboratory notebook associated with the notification:

ProductObject  (1)

Specify the product object associated with the notification:

ProtocolObject  (1)

Specify the protocol object associated with the notification:

SectionDetails  (1)

Specify the laboratory notebook page / section / subsection associated with the notification:

Sender  (1)

Specify email address of the sender:

SenderName  (1)

Specify name of the sender:

Subject  (1)

Specify the subject of the email:

TeamName  (1)

Specify the name of the team associated with the notification:

Template  (1)

Specify the name of the email template to be used:

TrackingNumber  (2)

Specify the tracking number for the order associated with the notification:

Specify tracking numbers for the order associated with the notification:

TransactionObject  (1)

Specify the order object associated with the notification:

TroubleshootingComments  (1)

Specify an updated CommentsLog for the troubleshooting associated with the notification:

TroubleshootingDescription  (1)

Specify the description of the troubleshooting associated with the notification:

TroubleshootingHeadline  (1)

Specify the headline of the troubleshooting associated with the notification:

TroubleshootingObject  (1)

Specify the troubleshooting object associated with the notification:

URL  (2)

Specify the URL associated with the notification:

Specify the URLs associated with the notification:

UserName  (1)

Specify the name of the user associated with the notification:

VersionNumber  (1)

Specify the ECL application version number associated with the notification:

Messages  (5)

AttachmentFileDoesNotExist  (1)

A hard error is thrown if a non-existant file is attached:

AttachmentFileTypeNotSupported  (1)

A hard error is thrown if an invalid file type is attached:

IncompleteTemplateFields  (1)

An error is thrown and $Failed is returned if not all required template field options have been specified:

InvalidTemplate  (1)

A hard error is thrown if an invalid template name is provided:

MailServerError  (1)

If there was an error sending emails, return $Failed: