Newsletter/mailing list how-to question (not really related to programming)
-
So, I have a need to make a mailing applications of sorts. I have people subscribing to receive notifications about certain parts on a website, e.g. what new articles there are on a certain topic, etc. Pretty similar to CP's own newsletter functionality. I have the whole thing planned out, but I just started thinking about what would happen if, say, there was a power outage while the application was running and sending out emails. Naturally, the server(s) would be on backup power, but, lets say the backup power fails, and the server shuts down. So then half the emails is sent, the other half isnt. What is the best thing to do when the server goes back up? Do nothing and just ignore unsent emails? Or perhaps send them all over again? The only solution I can think of is, since each and every email is sent separately (the content is different), is to loop through subscribers, one by one, generate an email, send, update database record somewhere saying that an email was sent already to that subscriber. Then move to the next one. And in case of a power outage, the program would just pick up from the point where it stopped - since it has the last person it sent the email to. Does this sound like a good way? Any suggestions/ideas? How does CP send its emails? I remember there was a problem a while ago, where some people would receive an email more than once, or receive it very-very later, or not receive one at all.
"impossible" is just an opinion.
-
So, I have a need to make a mailing applications of sorts. I have people subscribing to receive notifications about certain parts on a website, e.g. what new articles there are on a certain topic, etc. Pretty similar to CP's own newsletter functionality. I have the whole thing planned out, but I just started thinking about what would happen if, say, there was a power outage while the application was running and sending out emails. Naturally, the server(s) would be on backup power, but, lets say the backup power fails, and the server shuts down. So then half the emails is sent, the other half isnt. What is the best thing to do when the server goes back up? Do nothing and just ignore unsent emails? Or perhaps send them all over again? The only solution I can think of is, since each and every email is sent separately (the content is different), is to loop through subscribers, one by one, generate an email, send, update database record somewhere saying that an email was sent already to that subscriber. Then move to the next one. And in case of a power outage, the program would just pick up from the point where it stopped - since it has the last person it sent the email to. Does this sound like a good way? Any suggestions/ideas? How does CP send its emails? I remember there was a problem a while ago, where some people would receive an email more than once, or receive it very-very later, or not receive one at all.
"impossible" is just an opinion.
We actually send them out one by one, each email personally written and delivered by Mike. I simply write the foreword now - Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next. His Mondays are brutal
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
We actually send them out one by one, each email personally written and delivered by Mike. I simply write the foreword now - Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next. His Mondays are brutal
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
We actually send them out one by one, each email personally written and delivered by Mike. I simply write the foreword now - Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next. His Mondays are brutal
cheers, Chris Maunder
CodeProject.com : C++ MVP
I've seen people naming their servers after planets, rivers, lakes, constellations, or even car models. But people...man, Chris, if it has come to this, you honestly need to get out more.
:badger:
-
We actually send them out one by one, each email personally written and delivered by Mike. I simply write the foreword now - Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next. His Mondays are brutal
cheers, Chris Maunder
CodeProject.com : C++ MVP
Chris Maunder wrote:
Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next.
:eek: Poor Mike
Chris Maunder wrote:
His Mondays are brutal
:laugh: What about the remainder of the week?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
So, I have a need to make a mailing applications of sorts. I have people subscribing to receive notifications about certain parts on a website, e.g. what new articles there are on a certain topic, etc. Pretty similar to CP's own newsletter functionality. I have the whole thing planned out, but I just started thinking about what would happen if, say, there was a power outage while the application was running and sending out emails. Naturally, the server(s) would be on backup power, but, lets say the backup power fails, and the server shuts down. So then half the emails is sent, the other half isnt. What is the best thing to do when the server goes back up? Do nothing and just ignore unsent emails? Or perhaps send them all over again? The only solution I can think of is, since each and every email is sent separately (the content is different), is to loop through subscribers, one by one, generate an email, send, update database record somewhere saying that an email was sent already to that subscriber. Then move to the next one. And in case of a power outage, the program would just pick up from the point where it stopped - since it has the last person it sent the email to. Does this sound like a good way? Any suggestions/ideas? How does CP send its emails? I remember there was a problem a while ago, where some people would receive an email more than once, or receive it very-very later, or not receive one at all.
"impossible" is just an opinion.
you would want to keep track of which mailshot was sent to which user and the results (bounce / no bounce / failed / etc) so that: 1. you can pick up where you left off after the hypothetical power outage 2. you can stop sending to problem addresses after (say) 3 attempts (useful for not being permanently banned from the whole domain) each email is unique usually anyway even if it just has a unique tracking beacon on it so the extra overhead really isn't much hth :)
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
-
We actually send them out one by one, each email personally written and delivered by Mike. I simply write the foreword now - Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next. His Mondays are brutal
cheers, Chris Maunder
CodeProject.com : C++ MVP
And we appreciate the personal touch - really, we do, Chris.
-
We actually send them out one by one, each email personally written and delivered by Mike. I simply write the foreword now - Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next. His Mondays are brutal
cheers, Chris Maunder
CodeProject.com : C++ MVP
Not to mention how Mike has to painstakingly click "Authorize" every time someone posts a message somewhere in the site. Having said that, his Mondays still ought to be brutal.
-
So, I have a need to make a mailing applications of sorts. I have people subscribing to receive notifications about certain parts on a website, e.g. what new articles there are on a certain topic, etc. Pretty similar to CP's own newsletter functionality. I have the whole thing planned out, but I just started thinking about what would happen if, say, there was a power outage while the application was running and sending out emails. Naturally, the server(s) would be on backup power, but, lets say the backup power fails, and the server shuts down. So then half the emails is sent, the other half isnt. What is the best thing to do when the server goes back up? Do nothing and just ignore unsent emails? Or perhaps send them all over again? The only solution I can think of is, since each and every email is sent separately (the content is different), is to loop through subscribers, one by one, generate an email, send, update database record somewhere saying that an email was sent already to that subscriber. Then move to the next one. And in case of a power outage, the program would just pick up from the point where it stopped - since it has the last person it sent the email to. Does this sound like a good way? Any suggestions/ideas? How does CP send its emails? I remember there was a problem a while ago, where some people would receive an email more than once, or receive it very-very later, or not receive one at all.
"impossible" is just an opinion.
So hang on. Plan A is just send the emails. In the case of a power failure, Plan B is rely on backup power. In the case that backup power fails, You need a plan C? Who cares. Think of the amount of effort you'll put into the plan C stuff compared to the amount of times you will actually use it. Sod it, just take the simplest possible option[^] and resend all the emails. So half your readers may get 2 copies one week, they aren't going to care. Maybe this changes if your sever is somewhere without a reliable power supply (like Antarctica maybe), and power failures happen every time your home made generator runs low on diesel. Just my 2 cents ;) .
Simon
-
So hang on. Plan A is just send the emails. In the case of a power failure, Plan B is rely on backup power. In the case that backup power fails, You need a plan C? Who cares. Think of the amount of effort you'll put into the plan C stuff compared to the amount of times you will actually use it. Sod it, just take the simplest possible option[^] and resend all the emails. So half your readers may get 2 copies one week, they aren't going to care. Maybe this changes if your sever is somewhere without a reliable power supply (like Antarctica maybe), and power failures happen every time your home made generator runs low on diesel. Just my 2 cents ;) .
Simon
Thats exactly what I myself was thinking...And since Canada is a little far from Antarctica...you get the point :) Thanks for the input, guess I'm not the only one thinking this way.
:badger:
-
you would want to keep track of which mailshot was sent to which user and the results (bounce / no bounce / failed / etc) so that: 1. you can pick up where you left off after the hypothetical power outage 2. you can stop sending to problem addresses after (say) 3 attempts (useful for not being permanently banned from the whole domain) each email is unique usually anyway even if it just has a unique tracking beacon on it so the extra overhead really isn't much hth :)
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
Thanks for the suggestions:) This would be the ideal situation. If I am not mistaken, our mail server is configured in a way that it would keep track of the bounces, failed delivery, etc., so I don't wont to get involved in that. Though I'll keep this in mind for any future related work. As for the power outage/keeping track....I am going to go with Simon Stevens' reply just below yours. In the last 3-4 years, the servers only went down once - we changed the hosting company, and even that was only for a couple of minutes. I understand that this really isnt any indication of how well they are set up, but I don't think that even if the server does go down, then the people who receive their regularly scheduled spam newsletter twice will care much. Thanks anyway :), and both points are very valid.
"impossible" is just an opinion.
-
We actually send them out one by one, each email personally written and delivered by Mike. I simply write the foreword now - Mike is the one who actually looks up everyone's address, customises it, sends it, ticks off 'Mail Sent' on the spreadsheet and then moves to the next. His Mondays are brutal
cheers, Chris Maunder
CodeProject.com : C++ MVP
Is Mike one of your (in)famous hamsters? ;)
-- Kein Mitleid Für Die Mehrheit
-
Thats exactly what I myself was thinking...And since Canada is a little far from Antarctica...you get the point :) Thanks for the input, guess I'm not the only one thinking this way.
:badger:
Glad I could help. :)
Anton Afanasyev wrote:
Canada is a little far from Antarctica
Although I've heard it can get pretty cold up at the top end :laugh:
Simon
-
Is Mike one of your (in)famous hamsters? ;)
-- Kein Mitleid Für Die Mehrheit