Hi David,
Thank you for your post.
I think you can use a Timer and store it in Application states:
void Application_Start(object sender, EventArgs e)
{
Timer t = new Timer(3000);
t.Enabled = true;
t.Elapsed += new ElapsedEventHandler(t_Elapsed);
Application["timer"] = t;
}
void t_Elapsed(object sender, ElapsedEventArgs e)
{
...
}
Regarding sending email, you can use SmtpClient from System.Net.Mail
namespace.
Unlike System.Web.Mail, which was introduced in the 1.0 Framework,
System.Net.Mail is not built upon the CDO/CDOSYS libraries. Instead it is
written from the ground up without any interop. Thus, it is not dependant
upon on other COM libraries. Although some functionality has been removed,
the new System.Net.Mail namespace is much more versatile than the older CDO
dependant System.Web.Mail.
SmtpClient mailObj = new SmtpClient( "name of the host");
MailMessage mail = new MailMessage("(e-mail address removed)",
"(e-mail address removed)", "Testing", "Hello Everybody");
mailObj.Send(mail);
You can also config the Host, Credentials and Port properties for
SmtpClient by using the settings in the application or machine
configuration files. For example:
<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="network">
<network
host="localhost"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
</configuration>
Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.