473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Automatic emails

30
Hey guys,

I don't have an issue right now but I am starting a trading website similar to eBay and I cannot get my head around one thing. How do you code so that emails are sent out automatically without any user input/events.

Like when an eBay auction ends, you the seller would receive an email telling you that it ended. Or if say you have a yearly subscription to something and it's about to end, an email would be sent out telling you that the subscription is about to end.

These emails are sent out automatically, but I don't know how they work. Is it scripts on the server somewhere or in the database?

Please let me know.

Thanks
May 4 '08 #1
5 1729
ronverdonk
4,258 Expert 4TB
You'll need SOME action to send out emails. This could be the result of a regularly initiated job (like a cron job) or the result of another action such as the closing of a bid (which in itself requires some action).

Ronald
May 5 '08 #2
mlevit
30
You'll need SOME action to send out emails. This could be the result of a regularly initiated job (like a cron job) or the result of another action such as the closing of a bid (which in itself requires some action).

Ronald
But what happens if the auction closes without any bids on it. Then there has been no user input and therefore no action has been initiated by the user. And with cron jobs, that would require you to set the date/time for the actions to take place, but again in terms of the auction example, auctions end at any time and straight after they have ended the emails are sent out by the website.

I just can't wrap my mind around this.
May 5 '08 #3
Markus
6,050 Expert 4TB
But what happens if the auction closes without any bids on it. Then there has been no user input and therefore no action has been initiated by the user. And with cron jobs, that would require you to set the date/time for the actions to take place, but again in terms of the auction example, auctions end at any time and straight after they have ended the emails are sent out by the website.

I just can't wrap my mind around this.
Surely there must be some timer in place? When this timer reaches the end of it's run it'd initiate some other action to say that the auction has ended and do the relevant actions.
May 5 '08 #4
Atli
5,058 Expert 4TB
But what happens if the auction closes without any bids on it. Then there has been no user input and therefore no action has been initiated by the user. And with cron jobs, that would require you to set the date/time for the actions to take place, but again in terms of the auction example, auctions end at any time and straight after they have ended the emails are sent out by the website.

I just can't wrap my mind around this.
Nothing can ever happen without some sort of a action taking place.
In your eBay scenario, I would guess they have set up a cron-job that fires up every minute or so and checks if any auctions need to be closed.
May 5 '08 #5
TheServant
1,168 Expert 1GB
Surely there must be some timer in place? When this timer reaches the end of it's run it'd initiate some other action to say that the auction has ended and do the relevant actions.
Wouldn't you need it running the timer on an open page on the server or something?

What about making the auction so that once the time is <0, ie bidding is over, the person is stopped from bidding, and then just have a cron job which runs every 10mins to check the database for items that have expired and send an email to the owner?
You will need another variable 'email_sent' which will be 0 when bidding, and once the cron job has sent the email it changes it to 1. That way you won't spam someone every 10 mins!
May 5 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dan glenn | last post by:
I'm creating HTML emails from a PHP site and sending them out to an email list (just about 40 people so far are on this list). I've tested and confirmed that these emails work in yahoo.com's...
3
by: JP SIngh | last post by:
Is there a way to automatically execute code in ASP? I need to send reminders for one my applications and need some suggestions how I can send reminder emails automatically. Many thanks
5
by: Kun | last post by:
i have the following code: ---------------------------------- import smtplib from email.MIMEText import MIMEText fp = open('confirmation.txt', 'rb') msg = MIMEText(fp.read()) From =...
2
by: leeroy881 | last post by:
Is there a way to automatically import incoming emails into a SQL Server Database? I know it is inefficient, but we have to run a number of rules on the email after it is received. Store it in a...
1
by: shubhrarustagi | last post by:
hi, I'm a beginner developer and one of my first tasks is to develop automatic emails application in .net. We need to send automatic emails to users whose credit cards are expiring, create email...
0
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all my emails stored on the Yahoo! server. However sometimes I can’t get access to a PC/the web and I download my emails...
5
AllusiveKitten
by: AllusiveKitten | last post by:
Hi all, I really hope I can explain myself properly, I have set up coding to send multiple automatic emails which is working super! Each email that is being sent I receive the security Pop up box...
1
by: ramyabhaskar | last post by:
I have a MS access database which has to send emails at regular intervals. I am using VBA to do the project. I am new to this. So I am wondering how to send the automated emails to Outlook from...
2
by: anijos | last post by:
By default, the iPhone will only check for new emails manually when you open the Mail screen or when you tap the refresh icon (the icon in the lower left screen of the email list). You can configure...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.