Carol Cashman

Carol Cashman

  • NA
  • 74
  • 11.7k

Send Email to admin at specific time everyday

Jan 12 2018 7:51 AM
hey guys,
 
Does anyone know how i would code this:
 
to send an email to the admin/manager everyday at a specific time including a table from the database (Stock Table - which only has four pieces of stock) so they will be informed of their stock levels and if they need to reorder.
 
 
Or else 
 
Something in which will send an email to the manager/ admin if one of these four stock levels are low informing them a certin materials/ piece of stock has reached the minimum level and to re order. 
 
I have the code for sending an email: 
protected void Button1_Click1(object sender, EventArgs e)
{
MailMessage mail = new MailMessage(from.Text, to.Text, subject.Text, body.Text);
SmtpClient Client = new SmtpClient(smtp.Text);
Client.Port = 587;
Client.Credentials = new System.Net.NetworkCredential(username.Text, password.Text);
Client.EnableSsl = true;
Client.Send(mail);
Response.Write("<script LANGUAGE='JavaScript' >alert('Mail Sent')</script>");
}
 
any help is welcomed!!! 
 
Thank you! 
 

Answers (9)