Skip to content

Instantly share code, notes, and snippets.

View avmishra's full-sized avatar

Avadhesh Mishra avmishra

  • Mumbai, India
View GitHub Profile
@avmishra
avmishra / email.go
Created July 28, 2019 20:55 — forked from carelvwyk/email.go
Building an email in Golang to be delivered using Amazon SES
func buildEmailInput(source, destination, subject, message string,
csvFile []byte) (*ses.SendRawEmailInput, error) {
buf := new(bytes.Buffer)
writer := multipart.NewWriter(buf)
// email main header:
h := make(textproto.MIMEHeader)
h.Set("From", source)