sendMail check if from is own identity

This commit is contained in:
Gioacchino Mazzurco 2019-09-26 00:00:22 +02:00
parent 3401e8b49d
commit bdad0036f5
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -1240,6 +1240,8 @@ uint32_t p3MsgService::sendMail(
};
if(!pCheck(!from.isNull(), "from can't be null")) return false;
if(!pCheck( rsIdentity->isOwnId(from),
"from must be own identity") ) return false;
if(!pCheck(!(to.empty() && cc.empty() && bcc.empty()),
"You must specify at least one recipient" )) return false;