Hi,
We upgraded our product to use Aspose.Email Net from 6.1 to 18.2, and have the following warning message during compilation:
warning CS0612: ‘SmtpClient.AuthenticationMethod’ is obsolete
warning CS0612: ‘SmtpAuthentication’ is obsolete
The problem is that there is no further information either from the warning message or the API documentation about what should I do for the obsolete property, is this function been totally removed, or is it been replaced by other class or property?
private static void SendEmailMessage(MailMessage cleanedMessage)
{
SmtpClient smtpclient = new SmtpClient();
smtpclient.AuthenticationMethod = SmtpAuthentication.Auto;
smtpclient.DeliveryMethod = SmtpDeliveryMethod.Network;
string smtpHost = ConfigurationManager.AppSettings["SMTPHOST"];
if (String.IsNullOrEmpty(smtpHost))
{
throw new VfeOnlineException("Smtp host entry is missing from web.config.");
}
// if no entry in the web.config the port will be converted as 0
Int32 smtpPort = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPPORT"]);
smtpclient.Host = smtpHost;
smtpclient.Port = smtpPort;
smtpclient.Send(cleanedMessage);
}