Emailinterface
Represents an email with additional methods for interacting with Outlook.
Properties (11)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| attachments⚓︎ | Attachment[] | x | An array of identifiers for the attachments to the email. |
|
| bcc⚓︎ | T42Contact | T42Contact[] | x | The blind co-recipient(s) of the email. If this parameter is missing then there are no blind co-recipients. |
|
| body⚓︎ | string | x | The body text of the email, formatted as a plain string. |
|
| bodyHtml⚓︎ | string | x | The body of the email, formatted as an HTML string. If the email was not sent in HTML format, then the Helper must convert the plain-text body into a valid HTML string by wrapping it in the standard tags. |
|
| cc⚓︎ | T42Contact | T42Contact[] | x | The co-recipient(s) of the email. If this parameter is missing then there are no co-recipients. |
|
| date⚓︎ | Date | x | The time at which the email was sent, using local time for the sender. |
|
| entityType⚓︎ | number | x | The entity type identifier for the email. |
|
| ids⚓︎ | T42Id[] | x | Identifiers for the email; globally unique to the system. |
|
| sender⚓︎ | T42Contact | x | The originator of the email. This might be only the email address, if the T42Contact has not yet been resolved. |
|
| subject⚓︎ | string | x | The subject field of the email. |
|
| to⚓︎ | T42Contact | T42Contact[] | x | The primary recipient(s) of the email. |
5 Methods
getAsMsg()⚓︎
() => Promise<string>
Returns email, saved as .msg as base64.
Example
await outlook.newEmail(
{
to: "emailAddress@mail.com",
subject: "Sample subject",
body: "Sample body",
},
{
onSent: async (email) => {
const data = await email.getAsMsg();
console.log(data);
},
},
);
saveToFile()⚓︎
() => Promise<string>
Saves email as .msg file.
Example
await outlook.newEmail(
{
to: "emailAddress@mail.com",
subject: "Sample subject",
body: "Sample body",
},
{
onSent: async (email) => {
const uri = await email.saveToFile();
console.log(uri);
},
},
);
show()⚓︎
() => Promise<T42Id[]>
Shows email in Outlook.
Example
await outlook.newEmail(
{
to: "emailAddress@mail.com",
subject: "Sample subject",
body: "Sample body",
},
{
onSent: async (email) => {
const ids = await email.show();
console.log(ids);
},
},
);