Update: This has been fixed in Rebex Secure Mail 2015 R2.
We analyzed the logs we got from you and discovered that you are actually using two different versions of Rebex Secure Mail - when "inside" the firewall, you use 2013 R2 (build 4981). But when "outside" the firewall, you use 2015 R1 (build 5512).
Further analysis revealed that the error you encountered is caused by a bug in Rebex Secure Mail that first appeared in 2013 R3 and stayed unnoticed until now. This is clearly a mistake on our part and we appologize for any inconvenience this may have caused. We will fix it as possible. If you (or anyone else) need a hotfix, please let us know.
Alternatively, as a workaround, you might change your code to explicitly specify that NTLM authentication is to be used with this server:
client.Login("cgp\\eml_penn_mdp", "password", SmtpAuthentication.Ntlm);
This should solve the issue, but it will only work with servers that support NTLM. If you would like something universal, please use this code instead:
var methods = client.GetSupportedAuthenticationMethods();
if (Array.IndexOf(methods, SmtpAuthentication.GssApi) >= 0)
client.Login(userName, password, SmtpAuthentication.GssApi);
else if (Array.IndexOf(methods, SmtpAuthentication.Ntlm) >= 0)
client.Login(userName, password, SmtpAuthentication.Ntlm);
else
client.Login(userName, password, SmtpAuthentication.Auto);
Thanks for bringing this issue to our attention!