Skip to main content

EmailMessage

Email structure used with Email.


At a Glance

Email.send({
From: [{ Address: '[email protected]', PersonalName: 'Sender Name' }],
To: [{ Address: '[email protected]', PersonalName: 'Recipient Name' }],
Subject: 'Hello from layline.io',
Body: 'This is the email body.'
});

Properties

To / Cc / Bcc

Array of recipient objects, each with Address and PersonalName.

PropertyTypeDescription
AddressstringEmail address
PersonalNamestringDisplay name
To: [
{ Address: '[email protected]', PersonalName: 'Alice' },
{ Address: '[email protected]', PersonalName: 'Bob' }
]

ToList / CcList / BccList

Comma or semicolon separated string of email addresses. Use as a shortcut when you don't need display names.

From

Array of sender objects with the same structure as To.

From: [{ Address: '[email protected]', PersonalName: 'System' }]

Subject

string — The email subject line.

Body

string — The email body content.