Skip to content

How to send template mail via the SDK? #1972

Answered by HasanMdArik
HasanMdArik asked this question in Q&A
Discussion options

You must be logged in to vote

Oh I get it. It is deep inside the SendEmail function...

Let's look at the example below...

client.SendEmail(context.Background(), &sesv2.SendEmailInput{
		ConfigurationSetName: &ConfigurationSet,
		FromEmailAddress:     &from,
		Destination: &types.Destination{
			ToAddresses: []string{mailAddress},
		},
		Content: &types.EmailContent{
			Template: &types.Template{
			TemplateName: &VerificationCodeTemplate,
			TemplateData: &dataStr,
		},
	},
})

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by HasanMdArik
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant