The smtp appender now works with the current version of nodemailer
This commit is contained in:
parent
4a217afc37
commit
57fc9e7aa0
@ -24,7 +24,7 @@ function smtpAppender(config, layout) {
|
|||||||
function sendBuffer() {
|
function sendBuffer() {
|
||||||
if (logEventBuffer.length > 0) {
|
if (logEventBuffer.length > 0) {
|
||||||
|
|
||||||
var transport = mailer.createTransport(config.transport, config[config.transport]);
|
var transport = mailer.createTransport(config.SMTP);
|
||||||
var firstEvent = logEventBuffer[0];
|
var firstEvent = logEventBuffer[0];
|
||||||
var body = "";
|
var body = "";
|
||||||
while (logEventBuffer.length > 0) {
|
while (logEventBuffer.length > 0) {
|
||||||
|
@ -74,7 +74,6 @@ vows.describe('log4js smtpAppender').addBatch({
|
|||||||
topic: function() {
|
topic: function() {
|
||||||
var setup = setupLogging('minimal config', {
|
var setup = setupLogging('minimal config', {
|
||||||
recipients: 'recipient@domain.com',
|
recipients: 'recipient@domain.com',
|
||||||
transport: "SMTP",
|
|
||||||
SMTP: {
|
SMTP: {
|
||||||
port: 25,
|
port: 25,
|
||||||
auth: {
|
auth: {
|
||||||
@ -98,7 +97,6 @@ vows.describe('log4js smtpAppender').addBatch({
|
|||||||
recipients: 'recipient@domain.com',
|
recipients: 'recipient@domain.com',
|
||||||
sender: 'sender@domain.com',
|
sender: 'sender@domain.com',
|
||||||
subject: 'This is subject',
|
subject: 'This is subject',
|
||||||
transport: "SMTP",
|
|
||||||
SMTP: {
|
SMTP: {
|
||||||
port: 25,
|
port: 25,
|
||||||
auth: {
|
auth: {
|
||||||
@ -134,7 +132,6 @@ vows.describe('log4js smtpAppender').addBatch({
|
|||||||
var self = this;
|
var self = this;
|
||||||
var setup = setupLogging('separate email for each event', {
|
var setup = setupLogging('separate email for each event', {
|
||||||
recipients: 'recipient@domain.com',
|
recipients: 'recipient@domain.com',
|
||||||
transport: "SMTP",
|
|
||||||
SMTP: {
|
SMTP: {
|
||||||
port: 25,
|
port: 25,
|
||||||
auth: {
|
auth: {
|
||||||
@ -168,7 +165,6 @@ vows.describe('log4js smtpAppender').addBatch({
|
|||||||
var setup = setupLogging('multiple events in one email', {
|
var setup = setupLogging('multiple events in one email', {
|
||||||
recipients: 'recipient@domain.com',
|
recipients: 'recipient@domain.com',
|
||||||
sendInterval: 1,
|
sendInterval: 1,
|
||||||
transport: "SMTP",
|
|
||||||
SMTP: {
|
SMTP: {
|
||||||
port: 25,
|
port: 25,
|
||||||
auth: {
|
auth: {
|
||||||
@ -206,7 +202,6 @@ vows.describe('log4js smtpAppender').addBatch({
|
|||||||
var setup = setupLogging('error when sending email', {
|
var setup = setupLogging('error when sending email', {
|
||||||
recipients: 'recipient@domain.com',
|
recipients: 'recipient@domain.com',
|
||||||
sendInterval: 0,
|
sendInterval: 0,
|
||||||
transport: 'SMTP',
|
|
||||||
SMTP: { port: 25, auth: { user: 'user@domain.com' } }
|
SMTP: { port: 25, auth: { user: 'user@domain.com' } }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user