mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
e9c94876c0
This commit updates the import statement for jest in the setupTest.js file. The previous import statement used "globals" as the module name, which is incorrect. The correct module name is "jest". This change ensures that the jest module is imported correctly, improving the accuracy and reliability of the test setup.
30 lines
943 B
JavaScript
30 lines
943 B
JavaScript
// const MailParser = require('mailparser').MailParser;
|
|
|
|
// exports.hook_data_post = function (next, connection) {
|
|
// // Get the email data
|
|
// var email_data = connection.transaction.data_lines.join('\n');
|
|
|
|
// // Parse the email data
|
|
// var mailparser = new MailParser();
|
|
|
|
// mailparser.on('end', function(mail_object){
|
|
// // Log the email data
|
|
// connection.loginfo('Subject: ' + mail_object.subject);
|
|
// connection.loginfo('From: ' + JSON.stringify(mail_object.from));
|
|
// connection.loginfo('To: ' + JSON.stringify(mail_object.to));
|
|
// connection.loginfo('Text: ' + mail_object.text);
|
|
// connection.loginfo('HTML: ' + mail_object.html);
|
|
// });
|
|
|
|
// mailparser.write(email_data);
|
|
// mailparser.end();
|
|
|
|
// next();
|
|
// };
|
|
|
|
exports.hook_rcpt = function (next, connection, params) {
|
|
const rcpt = params[0];
|
|
this.loginfo("Got recipient: " + rcpt);
|
|
next();
|
|
};
|