Sending transactional mails

You can send transactional mails using the HTTP API operation sentransactionmail. The recipient's email address is specified with the bmrecipientId parameter and the transactional mail to be sent is defined with the bmMailingId parameter.

To see the mailing ID, open the Optimizely Campaign menu and select > Campaigns > Transactional Mails.

You can also add additional parameters for salutation, first and last name, web shop and language of the recipient: https://api.campaign.episerver.net/http/form/1234ABC/[email protected]&bmMailingId=1234567&salutation=Mr.&firstname=John&lastname=Smith&shopname=ShoeStore&language=en.

If you use the operation onlineversion instead of sendtransactionmail, you can open the transactional mail directly in the browser. This resolves all field functions. You can use this operation to test the encoding of the values and the design of the mailing without sending yourself an email for each test.

Using field functions

When sending transactional mails, personalized mailing content is transferred to the transaction recipient list using the parameters of the HTTP request and inserted at the respective position in the mailing using field functions.

Text with field functions:

Hello {salutation} {firstname} {lastname}, thank you for your registration in our web shop {shopname} on {registerdate}.

Text with personalized content:

Hello Mr. John Smith, thank you for your registration in our web shop ShoeStore on 2022-01-01.

The field function {registerdate} reads the value of the field Registration time and specifies it in the mailing without time.