smtp

package
v3.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT, Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IsSMTPResponse

type IsSMTPResponse struct {
	IsSMTP bool
	Banner string
}

IsSMTPResponse is the response from the IsSMTP function.

type SMTPClient

type SMTPClient struct{}

SMTPClient is a minimal SMTP client for nuclei scripts.

func (*SMTPClient) IsOpenRelay added in v3.1.3

func (c *SMTPClient) IsOpenRelay(host string, port int, msg *SMTPMessage) (bool, error)

func (*SMTPClient) IsSMTP

func (c *SMTPClient) IsSMTP(host string, port int) (IsSMTPResponse, error)

IsSMTP checks if a host is running a SMTP server.

func (*SMTPClient) SendMail added in v3.1.3

func (c *SMTPClient) SendMail(host string, port string, msg *SMTPMessage) (bool, error)

SendMail sends an email using the SMTP protocol.

type SMTPMessage added in v3.1.3

type SMTPMessage struct {
	// contains filtered or unexported fields
}

SMTPMessage is a simple smtp message builder

func (*SMTPMessage) Auth added in v3.1.3

func (s *SMTPMessage) Auth(username, password string) *SMTPMessage

Auth when called authenticates using username and password before sending the message

func (*SMTPMessage) Body added in v3.1.3

func (s *SMTPMessage) Body(msg []byte) *SMTPMessage

Body adds the message body to the message

func (*SMTPMessage) From added in v3.1.3

func (s *SMTPMessage) From(email string) *SMTPMessage

From adds the from field to the message

func (*SMTPMessage) String added in v3.1.3

func (s *SMTPMessage) String() string

String returns the string representation of the message

func (*SMTPMessage) Subject added in v3.1.3

func (s *SMTPMessage) Subject(sub string) *SMTPMessage

Subject adds the subject field to the message

func (*SMTPMessage) To added in v3.1.3

func (s *SMTPMessage) To(email string) *SMTPMessage

To adds the to field to the message

Jump to

Keyboard shortcuts

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