File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { LetterTemplate } from 'nhs-notify-web-template-management-utils';
77import Handlebars from 'handlebars' ;
88import { readFileSync } from 'node:fs' ;
99import path from 'node:path' ;
10+ import { randomUUID } from 'node:crypto' ;
1011
1112export class EmailClient {
1213 constructor (
@@ -89,15 +90,22 @@ export class EmailClient {
8990 return Promise . all (
9091 recipientEmailsForSupplier . map ( async ( recipientEmail ) => {
9192 const msg = createMimeMessage ( ) ;
93+
9294 msg . setSender ( { name : 'NHS Notify' , addr : this . senderEmail } ) ;
9395
9496 msg . setRecipient ( recipientEmail ) ;
9597 msg . setSubject ( subject ) ;
98+
9699 msg . addMessage ( {
97100 contentType : 'text/html' ,
98101 data : emailContent ,
99102 } ) ;
100103
104+ msg . addMessage ( {
105+ contentType : 'text/plain' ,
106+ data : 'plaintext fallback' ,
107+ } ) ;
108+
101109 const command = new SendRawEmailCommand ( {
102110 RawMessage : {
103111 Data : Buffer . from ( msg . asRaw ( ) ) ,
You can’t perform that action at this time.
0 commit comments