here is an update. I was able to build the project by disabling the package conflict error by adding the following to the project file.
Exe
net6.0-ios
NU1605
Howevever, I still can’t get scheduled email to go. Here is the relevant code.
DateTime scheduledAt = new DateTime(2023, 10, 17, 16, 50, 15, DateTimeKind.Utc);
//Console.WriteLine(« Scheduled time = [ » + scheduledTime.ToString(« yyyy-MM-ddTHH:mm:ss.fffzzz ») + « ] »);
// TimeZoneInfo estTimeZone = TimeZoneInfo.FindSystemTimeZoneById(« Eastern Standard Time »);
// DateTime scheduledAt = TimeZoneInfo.ConvertTimeFromUtc(scheduledTimeUtc, estTimeZone);
Console.WriteLine("Scheduled time = [" + scheduledAt.ToString("yyyy-MM-ddTHH:mm:ss.fffzzz") + "]");
try
{
var sendSmtpEmail = new SendSmtpEmail(Email, To, null, Cc, HtmlContent, TextContent, Subject, null, null, null, null, Params, messageVersiopns, null, scheduledAt);
CreateSmtpEmail result = apiInstance.SendTransacEmail(sendSmtpEmail);
when I put it a date that’s before the current date the application output gives me this warning.
2023-10-17 13:51:31.385 MAUISql[63158:1247193] Scheduled time = [2023-10-17T16:50:15.000+00:00]
Thread started: #13
Thread started: #14
Error calling SendTransacEmail: {« code »:« invalid_parameter »,« message »:« Scheduled date should not be less than current date »}
when I put a good date in I get this
2023-10-17 13:52:52.291 MAUISql[63194:1249275] Scheduled time = [2023-10-17T18:50:15.000+00:00]
2023-10-17 13:52:52.408 MAUISql[63194:1249310] Warning: observer object was not disposed manually with Dispose()
2023-10-17 13:52:52.409 MAUISql[63194:1249310] Warning: observer object was not disposed manually with Dispose()
Thread started: #14
Thread started: #15
{
« messageIds »: [
« 202311171752.59998685814.1@smtp-relay.mailin.fr »
]
}
notice the message id, however, nothing gets sent at the scheduled time.
When I null out the scheduledAt.
var sendSmtpEmail = new SendSmtpEmail(Email, To, null, Cc, HtmlContent, TextContent, Subject, null, null, null, null, Params, messageVersiopns, null, null);
the email is sent immediatly.
can you see any errors?