var emailThread = new EmailThread
{
Id = "5",
Subject = "Some subject",
Messages = new List<EmailDto>
{
new EmailDto
{
Attachments = new List<Attachment>
{
new Attachment
{
Name = "some-file.txt",
Base64Data = "U29tZSBmaWxlIGNvbnRlbnQ="
}
},
Body = "Some body",
BodyType = "Html",
Date = DateTime.Today,
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"
}
}
},
new EmailDto
{
Attachments = new List<Attachment>
{
new Attachment
{
Name = "some-file.txt",
Base64Data = "U29tZSBmaWxlIGNvbnRlbnQ="
}
},
Body = "Other body",
BodyType = "Html",
Date = DateTime.Today,
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"
}
}
}
}
};
EmailThread emailThread = Models.emailThread()
.id("5")
.subject("Some subject")
.messages(Arrays.<EmailDto>asList(
Models.emailDto()
.attachments(Arrays.<Attachment>asList(
Models.attachment()
.name("some-file.txt")
.base64Data("U29tZSBmaWxlIGNvbnRlbnQ=")
.build()))
.body("Some body")
.bodyType("Html")
.date(Calendar.getInstance().getTime())
.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(),
Models.emailDto()
.attachments(Arrays.<Attachment>asList(
Models.attachment()
.name("some-file.txt")
.base64Data("U29tZSBmaWxlIGNvbnRlbnQ=")
.build()))
.body("Other body")
.bodyType("Html")
.date(Calendar.getInstance().getTime())
.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();
email_thread = models.EmailThread(
id='5',
subject='Some subject',
messages=[
models.EmailDto(
attachments=[
models.Attachment(
name='some-file.txt',
base64_data='U29tZSBmaWxlIGNvbnRlbnQ=')],
body='Some body',
body_type='Html',
date=datetime.today(),
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')]),
models.EmailDto(
attachments=[
models.Attachment(
name='some-file.txt',
base64_data='U29tZSBmaWxlIGNvbnRlbnQ=')],
body='Other body',
body_type='Html',
date=datetime.today(),
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')])])
email_thread = EmailThread.new(
id: '5',
subject: 'Some subject',
messages: [
EmailDto.new(
attachments: [
Attachment.new(
name: 'some-file.txt',
base64_data: 'U29tZSBmaWxlIGNvbnRlbnQ=')],
body: 'Some body',
body_type: 'Html',
date: DateTime.now,
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')]),
EmailDto.new(
attachments: [
Attachment.new(
name: 'some-file.txt',
base64_data: 'U29tZSBmaWxlIGNvbnRlbnQ=')],
body: 'Other body',
body_type: 'Html',
date: DateTime.now,
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 emailThread = Models.emailThread()
.id('5')
.subject('Some subject')
.messages([
Models.emailDto()
.attachments([
Models.attachment()
.name('some-file.txt')
.base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
.build()])
.body('Some body')
.bodyType('Html')
.date(new Date())
.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(),
Models.emailDto()
.attachments([
Models.attachment()
.name('some-file.txt')
.base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
.build()])
.body('Other body')
.bodyType('Html')
.date(new Date())
.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();
$emailThread = Models::emailThread()
->id('5')
->subject('Some subject')
->messages(array(
Models::emailDto()
->attachments(array(
Models::attachment()
->name('some-file.txt')
->base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
->build()))
->body('Some body')
->bodyType('Html')
->date(new DateTime())
->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(),
Models::emailDto()
->attachments(array(
Models::attachment()
->name('some-file.txt')
->base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
->build()))
->body('Other body')
->bodyType('Html')
->date(new DateTime())
->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();