Skip to content

Instantly share code, notes, and snippets.

View ganeshlandge's full-sized avatar

Ganesh Landge ganeshlandge

  • @IISc Bangalore
  • Banglore
View GitHub Profile
@ganeshlandge
ganeshlandge / email.go
Created February 12, 2020 16:30 — 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)