Why the AWS SES service fails to send template emails


I am a backend developer using AWS services for my application, but when sending a regular email, it works flawlessly but while using sending templates, the SDK returns a positive response but the email is not being sent even after the emails have been verified. I use the Node JS AWS v3 SDK but until.

 const params = {
                Destination: {
                    ToAddresses: to
                Source: from,
                Template: templateName,
                TemplateData: JSON.stringify(templateData)
            await sesClient.send(new SendTemplatedEmailCommand(params))

code for operation and the templates have already been uploaded

<!DOCTYPE html>

    <title>Welcome to Our Community</title>

<body style="font-family: Arial, sans-serif; background-color: #f5f5f5; margin: 0; padding: 0;">
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;">
            <td align="center" bgcolor="#ffffff" style="padding: 40px 0;">
                <img src={{company_logo}} alt="Company Logo" width="150">
            <td bgcolor="#ffffff" style="padding: 40px 20px;">
                <h1>Welcome to Our Community!</h1>
                <p>Dear {{username}},</p>
                <p>We are excited to welcome you to our community! Thank you for joining us.</p>
                <p>Here's a brief overview of what you can expect:</p>
                    <li>Engage in meaningful discussions with like-minded individuals.</li>
                    <li>Access exclusive content and resources.</li>
                    <li>Stay updated with the latest news and events.</li>
                <p>We look forward to your active participation and contributions.</p>
                <p>If you have any questions or need assistance, feel free to contact us.</p>
                <p>Best regards,</p>
                <p>The {{company_name}} Team</p>
            <td bgcolor="#ffffff" style="padding: 20px 20px;">
                <p style="font-size: 12px; color: #777;">You received this email because you signed up for an account at
                    {{company_name}}. If you believe this email was sent to you in error, please disregard it.</p>


template being targeted

{"company_logo":"https://www.edigitalagency.com.au/wp-content/uploads/twitter-logo-black-png.png","username":"Mboh Bless Pearl","company_name":"Twitter"}

data being passed

asked 8 months ago241 views
1 Answer

Hi Mboh.

Please review the SES console and CloudTrail/CloudWatch logs to verify whether there was an issue after the email was accepted.

I hope this helps.

profile pictureAWS
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions