Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthMessage ¶
Generate a new authentication message given a target email and a gate code.
Input:
- sendTo string: Email to send the code to
- code string: Authentication code
Output:
- []byte: Properly formatted message for sending through smtp.
func SendMessage ¶
Send a message from a Host to an email address.
Input:
- sendFrom Host: SMTP host information
- sendTo string: Target email address
- msg []byte: Message to send. Use NewAuthMessage() to generate this.
Output:
- error: Any error that occurs when sending mail. This only includes failure to *access* the SMTP server, or invalid credentials; if all configuration is correct but the email fails to go through or sendTo is not a valid address, no error will be returned.
Types ¶
Click to show internal directories.
Click to hide internal directories.