POST example/api/mailmessage/{mailMessageId}/sendmailmessage
https://app.bwz.se/bedrock/example/api/mailmessage/{mailMessageId}/sendmailmessage
Sends (or schedules) a MailMessage.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
mailMessageId |
Id of the MailMessage to send. |
integer |
Required |
Body Parameters
If the mail message has recipient lists connected via the UI or API also send to them
SendMailMessageArgsName | Description | Type | Additional information |
---|---|---|---|
Subject |
Sets the e-mail subject. If not set, Subject of the MailMessage will be used. |
string |
None. |
FromName |
Sets the e-mail from name. If not set, FromName of the MailMessage will be used. |
string |
None. |
FromEmail |
Sets the from e-mail address. If not set, FromEmail of the MailMessage will be used. |
string |
Empty or a valid email adress |
ReplyToEmail |
Sets the e-mail address recipients can reply to. If not set, ReplyToEmail of the MailMessage will be used. |
string |
Empty or a valid email adress |
SendDate |
Sets the from date and time the e-mail will be sent. |
date |
None. |
UseStatistics |
Used to track openings and clicks. |
boolean |
None. |
UseIntegrationEvents |
Report events to a BIA (BizWizard Integration Agent). |
boolean |
None. |
MailRecipientListIds |
IDs of the lists the mail message will be sent to. |
Collection of integer |
None. |
SingleRecipientEmailAdresses |
E-mail addresses of single recipients the mail message will be sent to. |
Collection of string |
None. |
AlsoSendToAlreadyConnectedRecipientLists |
If the mail message has recipient lists connected via the UI or API also send to them |
boolean |
None. |
Request Formats
application/json, text/json
{ "Subject": "sample string 1", "FromName": "sample string 2", "FromEmail": "sample string 3", "ReplyToEmail": "sample string 4", "SendDate": "2024-11-24T00:10:03.3377594+01:00", "UseStatistics": true, "UseIntegrationEvents": true, "MailRecipientListIds": [ 1, 2 ], "SingleRecipientEmailAdresses": [ "sample string 1", "sample string 2" ], "AlsoSendToAlreadyConnectedRecipientLists": true }
application/xml, text/xml
<SendMailMessageArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.MailMessage"> <AlsoSendToAlreadyConnectedRecipientLists>true</AlsoSendToAlreadyConnectedRecipientLists> <FromEmail>sample string 3</FromEmail> <FromName>sample string 2</FromName> <MailRecipientListIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:int>1</d2p1:int> <d2p1:int>2</d2p1:int> </MailRecipientListIds> <ReplyToEmail>sample string 4</ReplyToEmail> <SendDate>2024-11-24T00:10:03.3377594+01:00</SendDate> <SingleRecipientEmailAdresses xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </SingleRecipientEmailAdresses> <Subject>sample string 1</Subject> <UseIntegrationEvents>true</UseIntegrationEvents> <UseStatistics>true</UseStatistics> </SendMailMessageArgs>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
The sent (or scheduled) MailMessageModel.
MailMessageQueuedModelName | Description | Type | Additional information |
---|---|---|---|
MailMessageQueueId |
Id of the mail message queue created when sending the mail message. Use this id for retreiving statistics |
integer |
None. |
Id |
Id of the MailMessage. |
integer |
None. |
Name |
Name of the MailMessage. |
string |
None. |
CreatedByUserId |
Id of the User creating the MailMessage. |
integer |
None. |
MessageStatus |
The MessageStatus of the MailMessage. |
MessageStatus |
None. |
CreationDate |
Date and time when the MailMessage was created. |
date |
None. |
ModifiedDate |
Date and time when the MailMessage was last modified. |
date |
None. |
PublicationId |
Id the of Publication the MailMessage belongs to. |
integer |
None. |
Description |
Description of the MailMessage. |
string |
None. |
SenderName |
Sender name of the MailMessage. |
string |
None. |
SenderEmail |
Email address of the sender of the MailMessage. |
string |
None. |
ReplyTo |
Reply-to address of the MailMessage. |
string |
None. |
Subject |
Subject of the MailMessage. |
string |
None. |
UseStatistics |
A flag indicating if the MailMessage will gather statistics when sent. |
boolean |
None. |
HtmlContentId |
Id of the Content holding the HTML content of the MailMessage. |
integer |
None. |
TextContentId |
Id of the Content holding the text content of the MailMessage. |
integer |
None. |
ScheduledSendDate |
Date and time when the MailMessage will be sent. |
date |
None. |
MailTemplateId |
Id of the MailTemplate used for the MailMessage |
integer |
None. |
Preheader |
Preheader text of the MailMessage |
string |
None. |
Response Formats
application/json, text/json
{ "MailMessageQueueId": 1, "Id": 2, "Name": "sample string 3", "CreatedByUserId": 4, "MessageStatus": 0, "CreationDate": "2024-11-24T00:10:03.3377594+01:00", "ModifiedDate": "2024-11-24T00:10:03.3377594+01:00", "PublicationId": 7, "Description": "sample string 8", "SenderName": "sample string 9", "SenderEmail": "sample string 10", "ReplyTo": "sample string 11", "Subject": "sample string 12", "UseStatistics": true, "HtmlContentId": 1, "TextContentId": 1, "ScheduledSendDate": "2024-11-24T00:10:03.3377594+01:00", "MailTemplateId": 1, "Preheader": "sample string 14" }
application/xml, text/xml
<MailMessageQueuedModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.MailMessage"> <CreatedByUserId>4</CreatedByUserId> <CreationDate>2024-11-24T00:10:03.3377594+01:00</CreationDate> <Description>sample string 8</Description> <HtmlContentId>1</HtmlContentId> <Id>2</Id> <MailTemplateId>1</MailTemplateId> <MessageStatus>NotReadyToSend</MessageStatus> <ModifiedDate>2024-11-24T00:10:03.3377594+01:00</ModifiedDate> <Name>sample string 3</Name> <Preheader>sample string 14</Preheader> <PublicationId>7</PublicationId> <ReplyTo>sample string 11</ReplyTo> <ScheduledSendDate>2024-11-24T00:10:03.3377594+01:00</ScheduledSendDate> <SenderEmail>sample string 10</SenderEmail> <SenderName>sample string 9</SenderName> <Subject>sample string 12</Subject> <TextContentId>1</TextContentId> <UseStatistics>true</UseStatistics> <MailMessageQueueId>1</MailMessageQueueId> </MailMessageQueuedModel>