@@ -98,7 +98,7 @@ async function sendEmail(record) {
98
98
if ( process . env . KONECTY_MODE !== 'production' ) {
99
99
mail . subject = `[DEV] [${ mail . to } ] ${ mail . subject } ` ;
100
100
// mail.to = null; // '[email protected] '
101
- mail . to = 'derotino.silveira @konecty.com' ;
101
+ mail . to = 'support @konecty.com' ;
102
102
mail . cc = null ;
103
103
mail . bcc = null ;
104
104
}
@@ -118,7 +118,7 @@ async function sendEmail(record) {
118
118
logger . info ( `📧 Email sent to ${ response . accepted . join ( ', ' ) } via [${ serverHost || record . server } ]` ) ;
119
119
}
120
120
} catch ( err ) {
121
- logger . error ( err , `📧 Email error: ${ err . message } ` ) ;
121
+ logger . error ( `📧 Email error: ${ err . message } ` ) ;
122
122
err . host = serverHost || record . server ;
123
123
await MetaObject . Collections [ 'Message' ] . updateOne ( { _id : record . _id } , { $set : { status : 'Falha no Envio' , error : err } } ) ;
124
124
@@ -199,11 +199,11 @@ async function consume() {
199
199
await BluebirdPromise . each ( range ( 0 , mailCount ) , async ( ) => {
200
200
const updatedRecords = await MetaObject . Collections [ 'Message' ] . findOneAndUpdate ( query , update , options ) ;
201
201
202
- if ( updatedRecords == null || updatedRecords . value == null ) {
202
+ if ( updatedRecords == null || updatedRecords . _id == null ) {
203
203
return ;
204
204
}
205
205
206
- return send ( updatedRecords . value ) ;
206
+ return send ( updatedRecords ) ;
207
207
} ) ;
208
208
209
209
return consumeCronJob . start ( ) ;
0 commit comments