Fixed #222 - RFC error with invalid FROM address with userid conf (#223)

* Fixed #222 - RFC error with invalide FROM address forcing userid config value

* Added user help text for #222 fix and pull request

* Fixing tab spacing for #222 fix before pull request acceptance
This commit is contained in:
Mike Sparr
2016-08-03 01:55:39 -06:00
committed by Dave Conway-Jones
parent 69b471b0f1
commit 17255b7bbf
3 changed files with 9 additions and 5 deletions

View File

@@ -86,7 +86,7 @@ module.exports = function(RED) {
if (msg.to && node.name && (msg.to !== node.name)) {
node.warn(RED._("node-red:common.errors.nooverride"));
}
var sendopts = { from: node.userid }; // sender address
var sendopts = { from: ((msg.from) ? msg.from : node.userid) }; // sender address
sendopts.to = node.name || msg.to; // comma separated list of addressees
if (node.name === "") {
sendopts.cc = msg.cc;