C# sendgrid SendAt不';我不能在Azure上工作

C# sendgrid SendAt不';我不能在Azure上工作,c#,azure,sendgrid,azure-app-service-envrmnt,C#,Azure,Sendgrid,Azure App Service Envrmnt,好吧,这很奇怪 我有一个使用sendgrid api(sendgrid 8.0.5)向人们发送预定电子邮件的代码。它在我的本地系统上运行良好,但在Azure(应用程序服务)上,它只是忽略了SendAt public async Task SendVotingTimeIsUpEmail(model) { sg = new SendGridAPIClient(SettingsHelper.Instance.EmailApiKey, "https://api.sendgrid.com"

好吧,这很奇怪

我有一个使用sendgrid api(sendgrid 8.0.5)向人们发送预定电子邮件的代码。它在我的本地系统上运行良好,但在Azure(应用程序服务)上,它只是忽略了SendAt

public async Task SendVotingTimeIsUpEmail(model)
    {
    sg = new SendGridAPIClient(SettingsHelper.Instance.EmailApiKey, "https://api.sendgrid.com");

    Email from = new Email(SettingsHelper.Instance.Sender);
    Email to = new Email(user.Email);
    Content content = new Content("text/html", "content");
    Mail mailSt = new Mail(from, "subject", to, content) { TemplateId = SettingsHelper.Instance.VotingTimeIsUpTemplateId };

    var datetimeOffset = new DateTimeOffset(model.ExpirationDate.Value, TimeSpan.Zero);
    mailSt.SendAt = datetimeOffset.ToUnixTimeSeconds();
    System.Diagnostics.Trace.TraceInformation($"Send at {mailSt.SendAt}");

    dynamic response = await sg.client.mail.send.post(requestBody: mailSt.Get());
}
我五分钟前就试过了。这是我日志中的内容:

致电1480594002 (即2016年12月1日星期四12:06:42 GMT)

今天是11月30日,所以我不希望它现在就发出这个信息。但我刚刚在电子邮件中收到了它

有什么想法吗