How to email out a website to people twice a week?

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
I create websites and my clients want a way to see the traffic reports twice a week. They want the reports emailed to them automatically twice a week.

I... don't know how to do this. I have a regular webpage with the traffic reports, but I need:

1. A short and sweet control panel where my client or I can schedule these automatic emails.

2. A short and sweet way for clients to disable these automatic emails.

Not sure which direction to go.
 

KLin

Lifer
Feb 29, 2000
29,500
125
106
1. setup SMTP on your web server
2. Write code in your programming language of choice to enable sending automated emails
3. Deploy it.
 

JustAnAverageGuy

Diamond Member
Aug 1, 2003
9,057
0
76
Probably easy enough to create an SQL job for it.

Make a table that has a list of users receiving the email and a day on which they'd like to receive it.

Then just have a page that modifies that table as necessary.

Procedure:

EmailAddresses[] = GetListOfRecipients() (SELECT Email from mail where DayReceived = DayOfWeek(GETDATE()))
EmailBody = FormatEmailBodyWithStats()

Email = new Email(to EmailAddresses[], From AutoNotifyAddress, Subject 'Traffic stats', Body EmailBody)

SendEmail(Email)
 
Last edited:

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
If you do the above, remember to sanitize all inputs, or mister SQL Injection might sign up for the email service.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,234
3,818
75
I gather you want something simple and pre-made, more or less. I have a crazy idea that might help you. One might even say it's "mad". ;)

MadMimi.com is the service a company I'm working with (being a contractor is complicated) uses to send emails to a list of customers. I think it ought to work for your purpose.
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
Are you sending the same email to all the clients or is it going to be customized on a per-client basis?