My project is hosted on Azure, and I would like to send an email every morning to users who have forgotten to complete certain tasks in my application.
I have my email built (sending using Postal). If I run the function itself, the emails send as expected.
I have configured the Azure scheduler to run an HTTPs action, get method, [https://www.example.com/Email/EmailReminder]. The scheduled job reporting as successful, but no emails are going out.
I haven't had to do this before, so I suspect I have a missing link between my function > scheduler job. I have searched for code samples on how to set this up, but I haven't found a solution yet. What is the scheduler expecting that I am not giving it?
public void EmailReminder()
{
var remCheckOuts = // query code here
into grouped
select new Reminder
{
/// populate viewmodel
});
// send emails
foreach (var i in remCheckOuts)
{
string Full = i.Full;
string FirstName = i.FirstName;
var CheckOutCt = i.CheckOutCt;
dynamic email = new Email("emReminder");
email.FromAdd = "[email protected]";
email.To = "[email protected]";
email.NPFirstName = NPFirstName;
email.CheckOutCt = CheckOutCt;
email.Send();
}
}