Hi all!
In our Desk Client plugin, we would like to send an email via the configured SMTP server using .net SmtpClient. Therefore we retrieve the required data through ToolOptionMailServer :
var mailNotificationProfiles = ms.MailNotificationProfileFolder.MailNotificationProfiles;
var mailServerSettingsConfigItem = ms.ToolOptionFolder.ToolOptions.FirstOrDefault(x => x.DisplayName.Equals("Mail server settings"));
var mailServerSettings = mailServerSettingsConfigItem as ToolOptionMailServer;
The password that is returned seems like to be in Hash-form. When trying to send an Email via SmtpClient.Send():
SmtpClient smtp = new SmtpClient( smtpHost, smtpPort )
{
Credentials = new NetworkCredential( username, password ),
EnableSsl = useSsl,
};
// Send the email
try
{
smtp.Send( mail );
}
catch( Exception ex )
{ }
we catch an “Invalid Authentication” exception. Is there a way to achieve proper authentication using the provided information by ToolOptionMailServer?
The Email configuration in XProtect was tested to be correct and working, by the way.