so can ready..hahax..thanx for your help ah..anyway do u know how do i do the scheduling to send this email every 9am and 5pm everyday?any codes for this??
-*BabyAngeL*-
Marked as answer by BabyAngel on Apr 28, 2009 04:56 AM
Create a Window Service and set it property to automatic. Write c# code send mail using Sustem.Net.Mail
You can use your exchange server setting by setting in app.config file.
Soumen, India
Budhi Hin Tanu Janike, Sumirau Pavan Kumar
Bal budhi Vidya dehu mohe,Harahu Kalesa Vikar
[My Site: WCF, My Site and Silverlight site @ Silverlight version].
woah..so cool..ok i tried and then run..but got problem..it opens microsoft frontpage and then shows an error sayin : "ERROR RENDERING CONTROL - PANEL1, AN UNHANDLED EXCEPTION HAS OCCURED. RegisterForEventValidation can only be called during Render()..
BabyAngel
Member
80 Points
226 Posts
Re: Sending of email!
Apr 28, 2009 04:54 AM|LINK
hey hey..haha..i did it man!! :P
i did it this way:
myMailMessage.Body = GetHttpWebPage_Obj.returnWebContain("http://localhost:3486/Sample/EmailTemplate/StatusEmail.aspx?SupportStaffID=" + Request.QueryString("SupportStaffID"))
so can ready..hahax..thanx for your help ah..anyway do u know how do i do the scheduling to send this email every 9am and 5pm everyday?any codes for this??
mo meng
Contributor
6700 Points
1351 Posts
Re: Sending of email!
Apr 28, 2009 05:06 AM|LINK
use window scheduler in the control panel
think can create 2 tasks there one to run at 9 and another at 5
run the exe file you created
BabyAngel
Member
80 Points
226 Posts
Re: Sending of email!
Apr 28, 2009 05:13 AM|LINK
hmmm..okay..but i cant find the windows schedular eh?
mo meng
Contributor
6700 Points
1351 Posts
Re: Sending of email!
Apr 28, 2009 05:31 AM|LINK
okie it call Scheduled Tasks
Rimbik
Participant
1359 Points
382 Posts
Re: Sending of email!
Apr 28, 2009 05:40 AM|LINK
Create a Window Service and set it property to automatic. Write c# code send mail using Sustem.Net.Mail
You can use your exchange server setting by setting in app.config file.
Soumen, India
Bal budhi Vidya dehu mohe,Harahu Kalesa Vikar
[My Site: WCF, My Site
and Silverlight site @ Silverlight version].
BabyAngel
Member
80 Points
226 Posts
Re: Sending of email!
Apr 28, 2009 05:51 AM|LINK
mo meng,
woah..so cool..ok i tried and then run..but got problem..it opens microsoft frontpage and then shows an error sayin : "ERROR RENDERING CONTROL - PANEL1, AN UNHANDLED EXCEPTION HAS OCCURED. RegisterForEventValidation can only be called during Render()..
what's this??
mo meng
Contributor
6700 Points
1351 Posts
Re: Sending of email!
Apr 28, 2009 06:02 AM|LINK
yup either way window service or also scheduler will work
what file you put to run the file?
BabyAngel
Member
80 Points
226 Posts
Re: Sending of email!
Apr 28, 2009 06:10 AM|LINK
my statusEmail..cuz the prog in my proj for the email template is StatusEmail..so i put in that one..wrong eh?
BabyAngel
Member
80 Points
226 Posts
Re: Sending of email!
Apr 28, 2009 06:11 AM|LINK
my statusEmail..cuz the prog in my proj for the email template is StatusEmail..so i put in that one..wrong eh?
mo meng
Contributor
6700 Points
1351 Posts
Re: Sending of email!
Apr 28, 2009 06:15 AM|LINK
amm forget one thing, you code in web application project eh~
what i intend just now is scehduler run the console application
i think you need to create a window service now as what rimbik suggested. rimbik .. got any coding fro this?