the problem was caused by the mailAuthentication
, now i'm using System.Security.SecureString
instead of Convert.ToBase64String
to encode passwords
and everything work well.
System.Security.SecureString secureString = new System.Security.SecureString();
stringFromPass.ToCharArray().ToList().ForEach(p => secureString.AppendChar(p));
NetworkCredential mailAuthentication = new NetworkCredential(stringFrom, secureString);
In outlook, you must configure your smtp to use email and password