🩹 (sendEmail) Save error first in logs
This commit is contained in:
@ -102,6 +102,7 @@ const sendEmail = async ({
|
|||||||
resultId,
|
resultId,
|
||||||
message: 'Email not sent',
|
message: 'Email not sent',
|
||||||
details: {
|
details: {
|
||||||
|
error: 'No email body found',
|
||||||
transportConfig,
|
transportConfig,
|
||||||
recipients,
|
recipients,
|
||||||
subject,
|
subject,
|
||||||
@ -146,12 +147,12 @@ const sendEmail = async ({
|
|||||||
resultId,
|
resultId,
|
||||||
message: 'Email not sent',
|
message: 'Email not sent',
|
||||||
details: {
|
details: {
|
||||||
|
error: err,
|
||||||
transportConfig: {
|
transportConfig: {
|
||||||
...transportConfig,
|
...transportConfig,
|
||||||
auth: { user: transportConfig.auth.user, pass: '******' },
|
auth: { user: transportConfig.auth.user, pass: '******' },
|
||||||
},
|
},
|
||||||
email,
|
email,
|
||||||
error: err,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user