HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

sendeventmail

Sends an event mailing to a single recipient in Optimizely Campaign.

Use this function to send, for example, confirmation emails, notifications, or status updates to existing recipients. In some cases, it may be useful to use the sendtransactionmail operation instead.

This operation is available in the mail and the form service.

❗️

Warning

Never use this HTTP API request directly on a web page or in a mailing. HTTP API requests of the form service must always be executed by the server without exposing the used source code to others. Otherwise, there is a potential risk that other web users will read this data and send emails from your client at your expense. To use HTTP operations in mailings, use the mail service of the HTTP API (see Mail service).

Parameters

NameMandatoryDefault valueDescription
bmRecipientIdyes/noThe ID of the recipient (usually the email address). If used in the mail service, this parameter is not mandatory (the email address is sent anyway). If used in the form service, the parameter is mandatory.
bmMailingIdyesThe ID of the event mailing to be sent.

Return values

ValueDescription
enqueued: <bmMailId>The sending process has been started. Use the operation getsendstatus to get the detailed sending status.
not_foundThe mailing with the given bmMailingId could not be found.
wrong_tagAuthorization failed.

Error codes:
  • 501=wrong authentication tag
  • 502=wrong request IP
  • 503=wrong request method
  • 504=wrong protocol
  • 505=wrong recipient list
  • 506=wrong action
  • 507=action not found

  • If a verification of the authentication tag does not solve the problem, contact [customer support](https://webhelp.episerver.com/latest/en/campaign/support/customer-support.htm "Customer support"). | | missing\_id | No **bmMailingId** was transmitted.

    When using the form service: No **bmMailingId** and/or no **bmRecipientId** was transmitted. | | syntax\_error | The transmitted **bmRecipientId** is invalid. | | wrong\_mailing\_type | The mailing with the given **bmMailingId** is not of the type event. | | wrong\_mailing\_status | The mailing with the given **bmMailingId** has been stopped or is finished. | | system\_error | A general error occurred. |

    Example

    .../form/.../sendeventmail?bmRecipientId=john.smith%40example.com&bmMailingId=12345 
    

    The mailing with the ID 12345 is sent to the recipient with the ID [email protected].


    What’s Next
    Did this page help you?