Added a recover when the MAPI Recipient are wrong.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2487 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-14 06:53:15 +00:00
commit 442a978d13

View file

@ -260,6 +260,11 @@ namespace Greenshot.Helpers {
string errorText = GetMapiError(errorCode);
LOG.Error("Error sending MAPI Email. Error: " + errorText + " (code = " + errorCode + ").");
MessageBox.Show(errorText, "Mail (MAPI) destination", MessageBoxButtons.OK, MessageBoxIcon.Error);
// Recover from bad settings, show again
if (errorCode == MAPI_CODES.INVALID_RECIPS) {
_recipientCollection = new RecipientCollection();
_ShowMail();
}
}
}
}