![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0
![]() |
Hello all,
I’m developing a site using ASP, but I’m sort of new with this. One of the things this site should have is a “mailing list.” It should work like this: - People will register by providing their e-mail address and other information. This information will be stored in a DB - They will receive an e-mail right after they register, and one e-mail per day for the following ten days. Now, I have no problem with the first e-mail, since that will be triggered by a push of a button. My problem starts with the last part… how do I send the 10 daily e-mail messages? As I said before, I’m quite new to ASP and I’ve never done something like this before. (The server runs Windows 2000 Adv. Server and I also use MS SQL Server 2000) Thank you very much for your help. ![]()
__________________
There are only two kinds of programming languages: those people always bitch about and those nobody uses. -- Bjarne Stroustrup |
|
|
|
|
|
#2 |
|
Expert Programmer
|
I've never used ASP. But heres a concept (sorry if there is a better way to do it)
Find a function that will display the date and time. (google will help you finding this function) Compare the time to see if an email needs sending Pseudo-code: IF time.get() == my_time_to_send_email THEN sendemail()
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0
![]() |
How to send (automatic) daily e-mails
Thanx for your reply coldDeath,
The problem with this is: who (or what) would trigger that function? It needs to be some sort of "unattended" mailing list. (i.e. the "system" goes on its own and retrieves the list of e-mails from the DB and sends the e-mail). Everything I've done so far in ASP, has been triggered by pressing a button, selecting from a list, etc. Thanx for your help.
__________________
There are only two kinds of programming languages: those people always bitch about and those nobody uses. -- Bjarne Stroustrup |
|
|
|
|
|
#4 |
|
Man Bear Pig Hunter
Join Date: Jul 2005
Location: NorCal, USA
Posts: 290
Rep Power: 4
![]() |
So basically you are saying you want to run a service? I don't believe that ASP has the ability thou ASP.NET does to be an application and not just a script, what you are looking to do I believe is say around 12:00 am (midnight) run this process of capturing emails and send them a message, at the same time. That is not done with a button or user action, I do not think can be done in ASP. Can you do ASP.NET?
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0
![]() |
Hello Ghost,
You've got it right, that's what I want to do. However, at this point, ASP is all I can use. Is there any other type of "external service" that I could use to do this in ASP? Thanx for your help ![]()
__________________
There are only two kinds of programming languages: those people always bitch about and those nobody uses. -- Bjarne Stroustrup |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Write your script and run it with a task scheduler (like a cron job). No need to make it its own freakin' service.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Man Bear Pig Hunter
Join Date: Jul 2005
Location: NorCal, USA
Posts: 290
Rep Power: 4
![]() |
You could do what DaWei is suggesting and seeing how you cannot run asp.net I would say that is your best bet. But like most things the more steps there are the more likely it is to have an issue or two. Hope the best to you.
|
|
|
|
|
|
#8 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Having the script mantain its own schedule isn't great advice. Registering a service for the purpose is just plain silly. I fully agree with DaWei.Your host should offer some sort of cron-like facility, running on Windows, *nix, or otherwise.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|