Extra logging for send-as

This commit is contained in:
Patrick Simpson 2018-04-18 13:43:20 +03:00
parent 7e63ec8c93
commit 0179e20a01
1 changed files with 3 additions and 1 deletions

View File

@ -144,13 +144,15 @@ namespace Acacia.Features.SendAs
{
using (IStore store = item.GetStore())
{
Logger.Instance.Trace(this, "SendAs ItemSend: {0}: {1}", item.Subject, store?.DisplayName);
ZPushAccount zpush = Watcher.Accounts.GetAccount(store);
if (zpush != null)
{
string address = item.SenderEmailAddress;
Logger.Instance.Trace(this, "SendAs ItemSend address: {0}: {1} - {2}", item.EntryID, address, zpush.Account.SmtpAddress);
if (address != null && address != zpush.Account.SmtpAddress)
{
Logger.Instance.Trace(this, "SendAs: {0}: {1}", address, item.SenderName);
Logger.Instance.Info(this, "SendAs: {0}: {1}", address, item.SenderName);
item.SetProperty(Constants.ZPUSH_SEND_AS, address);
if (item.SenderName != null)
item.SetProperty(Constants.ZPUSH_SEND_AS_NAME, item.SenderName);