Log.Logger = new LoggerConfiguration()
.WriteTo.Console(restrictedToMinimumLevel: LogEventLevel.Verbose)
.WriteTo.Email(new EmailConnectionInfo()
{
FromEmail = configuration["Email:fromEmail"],
EmailSubject = configuration["Email:subjectEmail"],
ToEmail = configuration["Email:toEmail"],
MailServer = configuration["Email:mailServer"],
},
restrictedToMinimumLevel: LogEventLevel.Error)
.CreateLogger();
这是我的代码。它可以在本地环境中发送电子邮件,但不能在docker容器中发送电子邮件。有人可以看看发生了什么吗?谢谢