phonepe #61
@ -193,31 +193,3 @@ export async function sendEmailWithAttachmentUtil(
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// Additional utility function for sending simple emails without attachments
|
||||
export async function sendSimpleEmailUtil(
|
||||
toAddress: string,
|
||||
subject: string,
|
||||
message: string
|
||||
): Promise<any> {
|
||||
try {
|
||||
const data: EmailRequest = {
|
||||
to: toAddress,
|
||||
html: message,
|
||||
subject: subject,
|
||||
text: stripHtml(message),
|
||||
from: process.env.SES_FROM_EMAIL || 'support@fitlien.com',
|
||||
replyTo: process.env.SES_REPLY_TO_EMAIL || 'support@fitlien.com'
|
||||
};
|
||||
|
||||
const recipients = Array.isArray(data.to) ? data.to : [data.to];
|
||||
const result = await sendSimpleEmail(data, recipients);
|
||||
|
||||
logger.info('Simple email sent successfully via SES');
|
||||
return { success: true, result };
|
||||
|
||||
} catch (error) {
|
||||
logger.error('Error sending simple email via SES:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user