Skip to content

Commit

Permalink
Merge 2fc62fe into fff069b
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Aug 22, 2023
2 parents fff069b + 2fc62fe commit 27ada1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Fix: smtp and smpp logs (#738)
- Add: allow access entities using NGSIv2 API for non_signal rules (new setting nonSignalByAPI / PERSEO_CHECK_NON_SIGNAL_BY_API) (#549)
- Remove support for ngsv1 notifications (#714)
- Remove ngsiv1 support for updateAction (#714)
Expand Down
12 changes: 9 additions & 3 deletions lib/models/emailAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,20 @@ function SendMail(action, event, callback) {
transporterOptions = buildTransporterOptions(action, event),
opt2log,
smtpConfig,
transporter;
transporter,
msgFromConfig;

if (transporterOptions.smtp) {
logger.debug('Using smtp transporter config from action: %j', transporterOptions.smtp);
smtpConfig = transporterOptions.smtp;
msgFromConfig = 'from action';
} else {
logger.debug('Using smtp transporter config: %j', config.smtp);
smtpConfig = config.smtp;
msgFromConfig = 'from global';
}
var smtpAuth = smtpConfig.auth;
smtpConfig.auth = { user: 'UUU', pass: 'XXX' };
logger.debug('Using smtp transporter %j config: %j', msgFromConfig, smtpConfig);
smtpConfig.auth = smtpAuth;
transporter = nodemailer.createTransport(smtpTransport(smtpConfig));
metrics.IncMetrics(event.service, event.subservice, metrics.actionEmail);

Expand All @@ -98,6 +103,7 @@ function SendMail(action, event, callback) {
subject: mailOptions.subject,
smtp: smtpConfig
};
opt2log.smtp.auth = { user: 'UUU', pass: 'XXX' };
myutils.logErrorIf(err, util.format('emailAction.SendMail %j', opt2log));
alarm.raise(alarm.EMAIL);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/models/smppAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function doIt(action, event, callback) {
password = options.smpp.password;
}
}
logger.debug('smpp session on connect system_id: %s, password: %s', systemid, password);
logger.debug('smpp session on connect system_id: %s', systemid);
session.bind_transceiver(
{
system_id: systemid,
Expand Down

0 comments on commit 27ada1f

Please sign in to comment.