This is my console app. I can zip it and upload it as a webjob,
but I need to read data from my azure db that is published with my .net site
{ static void Main(string[] args)
{ Console.WriteLine("shanzzzh@gmail.com");
MailAddress to = new MailAddress(Console.ReadLine());
Console.WriteLine("Mail From");
MailAddress from = new MailAddress(Console.ReadLine());
MailMessage mail = new MailMessage(from,to );
Console.WriteLine("Subject");
mail.Subject = Console.ReadLine()
Console.WriteLine("Your Message");
mail.Body = Console.ReadLine()
SmtpClient smtp = new SmtpClient();
smtp.Host = "pod51014.outlook.com";
smtp.Port = 587
smtp.Credentials = new NetworkCredential( "*********", "******");
smtp.EnableSsl = true;
Console.WriteLine("Sending email...");
smtp.Send(mail);
}
}
Is it possible to read azure db in a webjob? If so, how?