Skip to main content
Version: 8.0.2

Email

sendMail

Method allowing to send an email.

ParameterTypeDescription
{ mailOptions, transport, transportDefaults }SendMailOptions

SendMailOptions

ParameterTypeDescription
mailOptionsNMSMO
transportSMTPTransport / Options / string
transportDefaults?Options

sendMail Return value

SMTPTransport.SentMessageInfo

Return sent message information.

Basic Usage

await I.sendMail({
mailOptions: {
to: `testmaker@k-expert.com`,
subject: `Subject`,
attachments: [
{
filename: `TM.png`,
path: `./dist/reports/assets/manual_screenshots/TM.png`
}
],
from: `tm@yahoo.com`,
text: `This is the text`
},
transport: {
service: 'yahoo',
auth: {
user: 'tm@yahoo.com',
pass: 'pwd',
}
},
})

parseMail

Method allowing to parse an email.

ParameterTypeDescription
{ source, options }ParseMailParameters

ParseMailParameters

ParameterTypeDescription
sourcestringEmail to parse.
options?SimpleParserOptionsParsing options

createTestMailAccount

Method allowing to create a test mail account.

ParameterTypeDescription
apiUrlstring / undefined

createTestMailAccount Return value

TestAccount