feature/IO-2979-DST-Handling
- Checkpoint Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -28,22 +28,4 @@ let transporter = nodemailer.createTransport({
|
||||
SES: { ses, aws }
|
||||
});
|
||||
|
||||
if (isLocal) {
|
||||
// Wrap the sendMail function to log the email contents to the console in local environment
|
||||
const originalSendMail = transporter.sendMail.bind(transporter);
|
||||
transporter.sendMail = async (mailOptions) => {
|
||||
try {
|
||||
const result = await originalSendMail(mailOptions);
|
||||
console.log(
|
||||
`Email sent successfully - From: ${result?.envelope?.from} - To: ${result?.envelope?.to} - MessageID ${result.messageId} - Check LocalStack to see message`
|
||||
);
|
||||
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.error("Failed to send email:", error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = transporter;
|
||||
|
||||
Reference in New Issue
Block a user