smtp
- smtp
SMTPClient.IsOpenRelay(host, port, msg)⇒boolean.IsSMTP(host, port)⇒IsSMTPResponse.SendMail(host, port, msg)⇒boolean
SMTPMessage.Auth(username, password)⇒SMTPMessage.Body(msg)⇒SMTPMessage.From(email)⇒SMTPMessage.String()⇒string.Subject(sub)⇒SMTPMessage.To(email)⇒SMTPMessage
(smtp).SMTPClient
SMTPClient is a minimal SMTP client for nuclei scripts. Kind: inner class ofsmtp
SMTPClient.IsOpenRelay(host, port, msg)⇒boolean.IsSMTP(host, port)⇒IsSMTPResponse.SendMail(host, port, msg)⇒boolean
smtpClient.IsOpenRelay(host, port, msg) ⇒ boolean
IsOpenRelay checks if a host is an open relay
Kind: instance method of SMTPClientReturns:
boolean - - Whether the host is an open relay or not.Throws:
error- The error encountered during the check.
| Param | Type | Description |
|---|---|---|
| host | string | The host to check. |
| port | number | The port to check. |
| msg | string | The message to send. |
smtpClient.IsSMTP(host, port) ⇒ IsSMTPResponse
IsSMTP checks if a host is running a SMTP server.
Kind: instance method of SMTPClientReturns:
IsSMTPResponse - - The response from the SMTP server.Throws:
error- The error encountered during the check.
| Param | Type | Description |
|---|---|---|
| host | string | The host to check. |
| port | number | The port to check. |
smtpClient.SendMail(host, port, msg) ⇒ boolean
SendMail sends an email using the SMTP protocol.
Kind: instance method of SMTPClientReturns:
boolean - - Whether the email was sent successfully or not.Throws:
error- The error encountered during the email sending.
| Param | Type | Description |
|---|---|---|
| host | string | The host to send the email to. |
| port | number | The port to send the email to. |
| msg | string | The message to send. |
(smtp).SMTPMessage
SMTPMessage is a simple smtp message builder Kind: inner class ofsmtp
SMTPMessage.Auth(username, password)⇒SMTPMessage.Body(msg)⇒SMTPMessage.From(email)⇒SMTPMessage.String()⇒string.Subject(sub)⇒SMTPMessage.To(email)⇒SMTPMessage
smtpMessage.Auth(username, password) ⇒ SMTPMessage
Auth when called authenticates using username and password before sending the message
Kind: instance method of SMTPMessageReturns:
SMTPMessage - - The SMTPMessage object after authentication.
| Param | Type | Description |
|---|---|---|
| username | string | The username for authentication. |
| password | string | The password for authentication. |
smtpMessage.Body(msg) ⇒ SMTPMessage
Body adds the message body to the message
Kind: instance method of SMTPMessageReturns:
SMTPMessage - - The SMTPMessage object after adding the body.
| Param | Type | Description |
|---|---|---|
| msg | string | The message body to add. |
smtpMessage.From(email) ⇒ SMTPMessage
From adds the from field to the message
Kind: instance method of SMTPMessageReturns:
SMTPMessage - - The SMTPMessage object after adding the from field.
| Param | Type | Description |
|---|---|---|
string | The email to add to the from field. |
smtpMessage.String() ⇒ string
String returns the string representation of the message
Kind: instance method of SMTPMessageReturns:
string - - The string representation of the message.Example
smtpMessage.Subject(sub) ⇒ SMTPMessage
Subject adds the subject field to the message
Kind: instance method of SMTPMessageReturns:
SMTPMessage - - The SMTPMessage object after adding the subject.
| Param | Type | Description |
|---|---|---|
| sub | string | The subject to add. |
smtpMessage.To(email) ⇒ SMTPMessage
To adds the to field to the message
Kind: instance method of SMTPMessageReturns:
SMTPMessage - - The SMTPMessage object after adding the to field.
| Param | Type | Description |
|---|---|---|
string | The email to add to the to field. |