Skip to content

k6 extension to k6 extension to use smtp protocol (sending emails). Implemented using the xk6 system.

License

Notifications You must be signed in to change notification settings

gpiechnik2/xk6-smtp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xk6-smtp

k6 extension to k6 extension to use smtp protocol (sending emails). Implemented using the xk6 system.

Build

xk6 build --with github.com/gpiechnik2/xk6-smtp@latest

Example

An example of using the extension below. The options defined in the "mailOptions" variable are optional.

import smtp from 'k6/x/smtp';

export default function () {
    const mailOptions = {
        subject: "Test subject",
        message: "Test message",
        udw: ["[email protected]"]
    }

    smtp.sendMail(
        "smtp.gmail.com", 
        "587", 
        "[email protected]", 
        "senderPassword", 
        "[email protected]",
        mailOptions
    )
}