mail/client
Documentation
- source: mail/client.ts
Overview
Classes
MailClient
sendMultipart()
A static convenience method to send a multipart email without instantiating a client. This is suitable for emails that require attachments, inline images, or mixed content.
tsstatic sendMultipart(from: string, recipients: any, subject: string, parts: any): void;
Parameter Type Description fromstringThe sender's email address. recipientsanyThe recipient(s) structure (string for 'to', or MailRecipients object). subjectstringThe subject line of the email. partsanyAn array of MailMultipart objects defining the email content. Returns
- Type:
void- Description:
send()
A static convenience method to send a simple email with only a single text or HTML body.
tsstatic send(from: string, recipients: any, subject: string, text: string, contentType: MailContentType): void;
Parameter Type Description fromstringThe sender's email address. recipientsanyThe recipient(s) structure (string for 'to', or MailRecipients object). subjectstringThe subject line of the email. textstringThe body content of the email. contentTypeMailContentTypeSpecifies the body format: 'html' or 'plain'. Returns
- Type:
void- Description:
send()
Sends a simple email with a single body part (text or HTML).
tssend(from: string, _recipients: any, subject: string, text: string, contentType: MailContentType): void;
Parameter Type Description fromstringThe sender's email address. _recipientsanyThe recipient(s) structure (string for 'to', or MailRecipients object). subjectstringThe subject line of the email. textstringThe body content of the email. contentTypeMailContentTypeSpecifies the body format: 'html' or 'plain'. Returns
- Type:
void- Description:
sendMultipart()
Sends a complex email composed of multiple parts (text bodies, HTML, attachments, inline content).
tssendMultipart(from: string, _recipients: any, subject: string, parts: any): void;
Parameter Type Description fromstringThe sender's email address. _recipientsanyThe recipient(s) structure (string for 'to', or MailRecipients object). subjectstringThe subject line of the email. partsanyAn array of MailMultipart objects defining the email content. Returns
- Type:
void- Description:
