Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 14th, 2005, 1:31 PM   #1
rag05
Newbie
 
rag05's Avatar
 
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0 rag05 is on a distinguished road
Question How to send (automatic) daily e-mails

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
rag05 is offline   Reply With Quote
Old Dec 14th, 2005, 2:44 PM   #2
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 3 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
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.
coldDeath is offline   Reply With Quote
Old Dec 14th, 2005, 3:29 PM   #3
rag05
Newbie
 
rag05's Avatar
 
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0 rag05 is on a distinguished road
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
rag05 is offline   Reply With Quote
Old Dec 14th, 2005, 6:23 PM   #4
Ghost
Man Bear Pig Hunter
 
Ghost's Avatar
 
Join Date: Jul 2005
Location: NorCal, USA
Posts: 289
Rep Power: 3 Ghost is on a distinguished road
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?
Ghost is offline   Reply With Quote
Old Dec 14th, 2005, 6:47 PM   #5
rag05
Newbie
 
rag05's Avatar
 
Join Date: Oct 2005
Location: Texas
Posts: 11
Rep Power: 0 rag05 is on a distinguished road
Question

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
rag05 is offline   Reply With Quote
Old Dec 14th, 2005, 6:54 PM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Dec 14th, 2005, 7:18 PM   #7
Ghost
Man Bear Pig Hunter
 
Ghost's Avatar
 
Join Date: Jul 2005
Location: NorCal, USA
Posts: 289
Rep Power: 3 Ghost is on a distinguished road
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.
Ghost is offline   Reply With Quote
Old Dec 14th, 2005, 8:04 PM   #8
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 730
Rep Power: 4 Dameon is on a distinguished road
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
Dameon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:28 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC