Skip to content

Commit

Permalink
Merge pull request #2419 from cisagov/issue-2406/debug_email_notifica…
Browse files Browse the repository at this point in the history
…tion_system_no_attachments

Debug email system by removing template html for basic inline html.
  • Loading branch information
JCantu248 authored Dec 20, 2023
2 parents 292aaf2 + 24d9bf1 commit 69db9ec
Showing 1 changed file with 5 additions and 40 deletions.
45 changes: 5 additions & 40 deletions backend/src/api/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,58 +112,23 @@ export const sendUserNotificationEmail = async (
SES: new SES({ region: 'us-east-1' })
});

const client = new S3Client();
/*const client = new S3Client();
const html = await client.getEmailAsset(template_file);
const template = handlebars.compile(html);
const data = {
first_name: p_firstName,
last_name: p_lastname
};
const htmlToSend = template(data);
const htmlToSend = template(data);*/

const mailOptions = {
from: process.env.CROSSFEED_SUPPORT_EMAIL_SENDER,
to: recepient,
subject: p_subject,
html: htmlToSend,
attachments: [
{
filename: 'banner.png',
content: await client.getEmailAsset('banner.png'),
cid: 'CISA Banner'
},
{
filename: 'web.png',
content: await client.getEmailAsset('banner.png'),
cid: 'CISA Web'
},
{
filename: 'email.png',
content: await client.getEmailAsset('email.png'),
cid: 'CISA Email'
},
{
filename: 'linkedin.png',
content: await client.getEmailAsset('linkedin.png'),
cid: 'CISA LinkedIn'
},
{
filename: 'twitter.png',
content: await client.getEmailAsset('twitter.png'),
cid: 'CISA Twitter'
},
{
filename: 'facebook.png',
content: await client.getEmailAsset('facebooK.png'),
cid: 'CISA Facebook'
},
{
filename: 'instagram.png',
content: await client.getEmailAsset('instagram.png'),
cid: 'CISA Instagram'
}
]
html: '<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body><p>Testing</p></body></html>'
};

await transporter.sendMail(mailOptions);
Expand Down

0 comments on commit 69db9ec

Please sign in to comment.