# README
libsmtp is an add-on package for Go's net/smtp package.
The original net/smtp is rightfully incomplete, Go intends the standard library to remain small, nimble and manageable. The SMTP specification is none of those things.
libsmtp provides support for attachments and filling the client-fields in e-mail messages.
package main
import (
"fmt"
"github.com/AeroNotix/libsmtp"
"net/smtp"
"io"
"os"
)
func main() {
auth := smtp.PlainAuth(
"",
"your_email",
"password",
"smtp.domain.com",
)
f, _ := os.Open("/path/to/file/")
fmt.Println(
libsmtp.SendMailWithAttachments(
"smtp.domain.com:port",
&auth,
"[email protected]",
"Y u no talk?",
[]string{"[email protected]"},
[]byte("Message!"),
map[string]io.Reader{
"filename": f,
},
),
)
}
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
# Structs
Base64Email is a wrapper around the encoding/base64 encoder since e-mails require a little more formatting when pieces are encoded, rather than a single block of base64'd data we need to split it up into fixed-sized blocks.
# Type aliases
No description provided by the author