Vicens
  • Vicens
  • 50.75% (Neutral)
  • Newbie Topic Starter
4 years ago
Hi,

When I exEcute this code in Net Core 5.0, I get the next error : Error System.NullReferenceException: 'Object reference not set to an instance of an object.'

using EASendMail;
....
....
SmtpMail oMail = new("ES-XXXXXXXXXXXXXXXXXXX");
SmtpClient oSmtp = new();
SmtpServer oServer = new(configCorreo.CSmtp); //servidor de envĂ­o
oServer.AuthType = SmtpAuthType.AuthAuto;
oServer.User = configCorreo.CUserMail;
oServer.Password = configCorreo.CPass;
oServer.Port = configCorreo.NPuerto;

This error is generated at first line "SmtpMail oMail = new("ES-XXXXXXXXXXXXXXXXXXX");"

Thanks for any help.
Regards

Vicens

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.