mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-28 10:47:45 +08:00
store queue id
This commit is contained in:
parent
2a24ff9331
commit
329a157f03
2 changed files with 10 additions and 3 deletions
|
@ -11,7 +11,7 @@ const htmlToText = require('html-to-text');
|
|||
const Joi = require('../joi');
|
||||
const ObjectID = require('mongodb').ObjectID;
|
||||
const tools = require('../tools');
|
||||
const maildrop = require('../maildrop');
|
||||
const Maildropper = require('../maildropper');
|
||||
const roles = require('../roles');
|
||||
const Transform = require('stream').Transform;
|
||||
|
||||
|
@ -30,6 +30,13 @@ class StreamCollect extends Transform {
|
|||
}
|
||||
|
||||
module.exports = (db, server, messageHandler, userHandler) => {
|
||||
let maildrop = new Maildropper({
|
||||
db,
|
||||
zone: config.sender.zone,
|
||||
collection: config.sender.collection,
|
||||
gfs: config.sender.gfs
|
||||
});
|
||||
|
||||
function submitMessage(options, callback) {
|
||||
let user = options.user;
|
||||
|
||||
|
@ -461,7 +468,7 @@ module.exports = (db, server, messageHandler, userHandler) => {
|
|||
}
|
||||
|
||||
// push message to outbound queue
|
||||
let message = maildrop(
|
||||
let message = maildrop.push(
|
||||
{
|
||||
parentId: messageId,
|
||||
reason: 'submit',
|
||||
|
|
|
@ -487,7 +487,7 @@ class MessageHandler {
|
|||
ha: messageData.ha,
|
||||
mailbox: mailboxData._id,
|
||||
mailboxPath: mailboxData.path,
|
||||
info: messageData.meta
|
||||
info: Object.assign({ queueId: messageData.outbound }, messageData.meta)
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue