I am working on an task in which i have to send pdf file as attachment in email, i'm using the Golang AWS SES-v2 package for sending emails. Earlier i was just sending all the emails without any attachment which consists of subject and body.
input := &sesv2.SendEmailInput{
Destination: &types.Destination{
CcAddresses: []string{},
ToAddresses: []string{"receiver@example.com"},
},
Content: &types.EmailContent{
Simple: &types.Message{
Body: &types.Body{
Html: &types.Content{
Charset: aws.String(CharSet),
Data: aws.String(emailData["body"]),
},
},
Subject: &types.Content{
Charset: aws.String(CharSet),
Data: aws.String(emailData["subject"]),
},
},
}
But as per my new requirement i want to send email along with pdf file as attachment, i tried searching and i have found that we can send attachments using Raw method, but is there any other way to send Pdf as attachment in email using the aws sesv2.