Skip to content

Commit

Permalink
change sender domain, remove click and open tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Jan 21, 2025
1 parent 34ead1d commit 1d9b17a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions api/src/modules/notifications/email/sendgrid.email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import * as sgMail from '@sendgrid/mail';
import * as config from 'config';
import { MailDataRequired } from '@sendgrid/helpers/classes/mail';

const SENDER_MAIL_ADDRESS: string = '[email protected]';
// Can't check rn, but this address might be authenticated in Sendgrid as it is used in the mkt site
const SENDER_MAIL_ADDRESS: string = '[email protected]';

@Injectable()
export class SendgridEmailService implements IEmailService {
Expand All @@ -28,7 +29,18 @@ export class SendgridEmailService implements IEmailService {
}

async sendMail(mail: SendMailDTO): Promise<any> {
const msg: MailDataRequired = { ...mail, from: SENDER_MAIL_ADDRESS };
const msg: MailDataRequired = {
...mail,
from: SENDER_MAIL_ADDRESS,
trackingSettings: {
clickTracking: {
enable: false,
},
openTracking: {
enable: false,
},
},
};
try {
return sgMail.send(msg);
} catch (e) {
Expand Down

0 comments on commit 1d9b17a

Please sign in to comment.