Message properties
Learn how to test the common properties of an email or SMS message with SMSByrd.
Before you begin
The examples shown below are based on two key assumptions:
- That you have already create a basic automated test using our getting started guides.
- You have a chosen assertion library that you will use to test the values shown below.
Email subject
Allows you to check that the correct subject will be displayed in a recipient’s mail client.
Recipients
The to property of a message contains an array of all recipients of a message (excluding those that have been carbon-copied on an email).
//code snippet
Carbon copy (CC) recipients
//code snippet
Blind carbon-copy (BCC) recipients
//code snippet
Sender
The from property of a message contains an array of senders. In almost all cases there will only be 1, however the email specification technically allows for multiple senders to exist.
Email Headers
Emails contain a set of headers that are used to transmit metadata which is typically not visible to the recipient.
All email headers are available via the metadata.headers property of a message. Each header has both a field and value property.
//code snippet