smtp

package module
v1.1.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 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)

func (*SMTP) SendMailNoAuth

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

Jump to

Keyboard shortcuts

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