smtp

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

��# 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: ["udwRecipient@gmail.com"]
    }

    smtp.sendMail(
        "smtp.gmail.com", 
        "587", 
        "sender@gmail.com", 
        "senderPassword", 
        "recipient@gmail.com",
        mailOptions
    )
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMTP

type SMTP struct{}

func (*SMTP) SendMail

func (*SMTP) SendMail(host string, port string, sender string, password string, recipient string, options options)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL