I'm using the official AWS Golang SDK to integrate with SES but can't find any information about how to add some attachments (pdf file represented as []byte in code) to the email.
Could you help me?
The current email sending code looks like this:
sesEmailInput := &ses.SendEmailInput{
Destination: &ses.Destination{
ToAddresses: []*string{aws.String("To address")},
},
Message: &ses.Message{
Subject: &ses.Content{
Data: aws.String("Some text"),
},
Body: &ses.Body{
Html: &ses.Content{
Data: aws.String("Some Text"),
},
},
},
Source: aws.String("From address"),
ReplyToAddresses: []*string{
aws.String("From address"),
},
}
if _, err := s.sesSession.SendEmail(sesEmailInput); err != nil {
return err
}