var mailMessageDto = new MailMessageDto
{
Value = new EmailDto
{
Attachments = new List<Attachment>
{
new Attachment
{
Name = "some-file.txt",
Base64Data = "U29tZSBmaWxlIGNvbnRlbnQ="
}
},
Body = "Some body",
BodyType = "Html",
DeliveryNotificationOptions = new List<EmailDeliveryNotificationOptions>
{
"OnSuccess",
"Delay"
},
From = new MailAddress
{
DisplayName = "From Address",
Address = "from@aspose.com"
},
HtmlBody = "<b>Some body</b>",
IsBodyHtml = true,
IsDraft = true,
Subject = "Re: Some subject",
To = new List<MailAddress>
{
new MailAddress
{
DisplayName = "To Address",
Address = "to@aspose.com"
}
}
}
};
MailMessageDto mailMessageDto = Models.mailMessageDto()
.value(Models.emailDto()
.attachments(Arrays.<Attachment>asList(
Models.attachment()
.name("some-file.txt")
.base64Data("U29tZSBmaWxlIGNvbnRlbnQ=")
.build()))
.body("Some body")
.bodyType("Html")
.deliveryNotificationOptions(Arrays.<EmailDeliveryNotificationOptions>asList(
"OnSuccess",
"Delay"))
.from(Models.mailAddress()
.displayName("From Address")
.address("from@aspose.com")
.build())
.htmlBody("<b>Some body</b>")
.isBodyHtml(true)
.isDraft(true)
.subject("Re: Some subject")
.to(Arrays.<MailAddress>asList(
Models.mailAddress()
.displayName("To Address")
.address("to@aspose.com")
.build()))
.build())
.build();
mail_message_dto = models.MailMessageDto(
value=models.EmailDto(
attachments=[
models.Attachment(
name='some-file.txt',
base64_data='U29tZSBmaWxlIGNvbnRlbnQ=')],
body='Some body',
body_type='Html',
delivery_notification_options=[
'OnSuccess',
'Delay'],
_from=models.MailAddress(
display_name='From Address',
address='from@aspose.com'),
html_body='<b>Some body</b>',
is_body_html=True,
is_draft=True,
subject='Re: Some subject',
to=[
models.MailAddress(
display_name='To Address',
address='to@aspose.com')]))
mail_message_dto = MailMessageDto.new(
value: EmailDto.new(
attachments: [
Attachment.new(
name: 'some-file.txt',
base64_data: 'U29tZSBmaWxlIGNvbnRlbnQ=')],
body: 'Some body',
body_type: 'Html',
delivery_notification_options: [
'OnSuccess',
'Delay'],
from: MailAddress.new(
display_name: 'From Address',
address: 'from@aspose.com'),
html_body: '<b>Some body</b>',
is_body_html: true,
is_draft: true,
subject: 'Re: Some subject',
to: [
MailAddress.new(
display_name: 'To Address',
address: 'to@aspose.com')]))
let mailMessageDto = Models.mailMessageDto()
.value(Models.emailDto()
.attachments([
Models.attachment()
.name('some-file.txt')
.base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
.build()])
.body('Some body')
.bodyType('Html')
.deliveryNotificationOptions([
'OnSuccess',
'Delay'])
.from(Models.mailAddress()
.displayName('From Address')
.address('from@aspose.com')
.build())
.htmlBody('<b>Some body</b>')
.isBodyHtml(true)
.isDraft(true)
.subject('Re: Some subject')
.to([
Models.mailAddress()
.displayName('To Address')
.address('to@aspose.com')
.build()])
.build())
.build();
$mailMessageDto = Models::mailMessageDto()
->value(Models::emailDto()
->attachments(array(
Models::attachment()
->name('some-file.txt')
->base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
->build()))
->body('Some body')
->bodyType('Html')
->deliveryNotificationOptions(array(
'OnSuccess',
'Delay'))
->from(Models::mailAddress()
->displayName('From Address')
->address('from@aspose.com')
->build())
->htmlBody('<b>Some body</b>')
->isBodyHtml(true)
->isDraft(true)
->subject('Re: Some subject')
->to(array(
Models::mailAddress()
->displayName('To Address')
->address('to@aspose.com')
->build()))
->build())
->build();