Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

If you were going to set up a Email Alerts for the customers of your website to subscribe to, what rules of etiquette ought to be followed?

I can think of a few off the top of my head:

  • Users can Opt-Out
  • Text Only (Or tasteful Remote Images)
  • Not sent out more than once a week
  • Clients have fine-grained control over what they receive emails about (Only receive what they are interested in)

What other points should I consider?

From a programming standpoint, what is the best method for setting up and running email notifications?

  • Should I use an ASP.NET Service? A Windows Service? What are the pitfalls to either?
  • How should I log emails that are sent? I don't care if they're received, but I do need to be able to prove that I did or did not send an email.
share|improve this question

migrated from stackoverflow.com Jan 30 '11 at 20:08

This question came from our site for professional and enthusiast programmers.

11  
I prefer opt-in to opt-out. I'm answering in the comment because that's not really the programming part of the question. –  Aaron Smith Mar 20 '09 at 19:17
    
+1 for Aaron's comment ;) –  Ken Browning Mar 20 '09 at 19:18
2  
@Aaron Smith : I recommend you put that in as an answer. Web Development has all sorts of tangential relations to programming, and this is a 'good' piece of advice. –  George Stocker Mar 20 '09 at 19:19
2  
what is asp.net and C# about this question? This could be done on any platform and in any language. The best practices for doing this would apply to all of them. –  Bratch Mar 20 '09 at 19:23
    
@Aaron, I thought the question implied that the users were already 'opting-in'. But your note is an incredibly important one. NEVER EVER EVER auto-subscribe people. –  Anonymous Mar 20 '09 at 19:42
show 4 more comments

10 Answers

The Opt-Out Process should NOT be "Reply to the email with 'unsubscribe' in the subject". I use a catch-all for all my subscriptions (helps control spam) because of that I can't reply from every address that I give out (wallmart_username@domain.com). Making it really hard for me to unsubscribe from certain lists.

Opt-Out links work the best.

share|improve this answer
    
I probably won't accept your answer unless you edit it to include other things I've brought up. –  George Stocker Jul 10 '09 at 13:23
    
Changing the From: address in the header is straightforward in most clients. As long as the checks are made on the headers rather than the envelope then it will unsubscribe fine. –  Legooolas Jul 20 '09 at 11:08
add comment

I prefer opt-in to opt-out.

share|improve this answer
3  
Any mail I get that I did not opt in for goes in my junk mail and I make a mental note never to deal with the company that is spamming me with unrequested mail again. I don't think people should ever send email to people who haven't specifically asked for it, even if they allow opting out. –  Russell Troywest Jul 9 '09 at 11:38
    
I probably won't accept your answer unless you edit it to include other things I've brought up. Commenting so you'll update your answer. –  George Stocker Jul 10 '09 at 13:52
    
What do you want me to add to my answer? I don't mind if you don't accept it. –  Aaron Smith Jul 10 '09 at 16:08
    
See updated question. Just wanted everyone to know that I've not made a decision about the bounty and won't until a few hours until it's due. Still gives you time to add more information. –  George Stocker Jul 10 '09 at 19:38
add comment

Opting out

It's not merely etiquette it is United States law:

From the CAN-SPAM Act:

It requires that your email give recipients an opt-out method. You must provide a return email address or another Internet-based response mechanism that allows a recipient to ask you not to send future email messages to that email address, and you must honor the requests. You may create a "menu" of choices to allow a recipient to opt out of certain types of messages, but you must include the option to end any commercial messages from the sender.

Any opt-out mechanism you offer must be able to process opt-out requests for at least 30 days after you send your commercial email. When you receive an opt-out request, the law gives you 10 business days to stop sending email to the requestor's email address. You cannot help another entity send email to that address, or have another entity send email on your behalf to that address. Finally, it's illegal for you to sell or transfer the email addresses of people who choose not to receive your email, even in the form of a mailing list, unless you transfer the addresses so another entity can comply with the law.

Text only

I'm not entirely sold on this feature. From certain websites such as amazon.com or guitarcenter.com I like the ability to view the products that are offerred directly in the email without having to click an external link. Besides, GMail has the ability to block the images anyway if I don't want to see them. However, I suppose if you're controlling the entire process you could offer a checkbox for the user to pick HTML or plain text emails as well.

Frequency of distribution

It's tough to decide how often you should send out mass email notifications because it really depends on the content of your website. I agree that a weekly submission is a good start.

Method of distribution

I imagine the real answer to this depends on scalability. How many emails will you be sending and how often? I imagine creating a Windows service would be the most maintainable and customizable solution if you have a relatively low number of emails to send. If you need a more robust solution, I would look for a professional mass-email product.

Logging

You could do this in a SQL database or in flat text log files. This really depends on how you will audit these details. You could build a system easily around the database if you need other people to validate that certain emails were sent. I imagine though that this will not be necessary.

If you go the flat text log file route, you could use a proven logging system such as log4net since you mention .NET.

As for what to log, I would expect something like:

  • Start time for the queue
  • Per email:
    • Position in queue
    • Recipient email address
    • Time sent
  • Time of completion

Miscellaneous

  • Make sure to include the name of your website or the address of your company in every email
  • Keep the relevant information at the top of the email so the user doesn't have to scroll down
  • Use correct spelling and avoid ALL CAPS
  • Use tasteful, low-bandwidth images
  • Make sure you only have one recipient per email, so the To: line doesn't contain 100 email addresses
  • Don't send personally identifiable user information in the email (e.g. credit card info)
  • Avoid attachments
share|improve this answer
1  
Might not be "law"... The act allows a "transactional or relationship message" (email that ... updates a customer in an existing business relationship) and if the recipient requested the notification in the first place then there's an existing business relationship. –  WaldenL Mar 20 '09 at 19:34
1  
Great Link, btw. –  George Stocker Mar 30 '09 at 19:17
1  
Specifically: United States law –  JeffH Jul 9 '09 at 16:19
    
@Gortok - thanks for the update. @WaldenL - true, but I can't assume there is one. @JeffH - good point, added to answer. –  John Rasch Jul 10 '09 at 15:00
    
Regarding frequency of distribution: make sure the users know up-front how often it will be coming. Eg "[x] Send me weekly updates about abcxyz" –  Kimball Robinson Sep 8 '10 at 2:01
add comment

Frequency Etiquette

I think that more important than 'not sent out more than one a week' would be 'sent out as infrequently as possible'

If you NEED to send out two in one week, then do so. But if you don't need to send them out, then don't send out anything.

Alternatively, you could make it 'newsletter' style, and send it out on a regular (scheduled) basis. But in that case you would need to ensure that you have specific relevant things to say in each message.

Ease of use

Make it incredibly easy to sign up, and sign out.

Make it incredibly easy (and optional) for them to customize it.

You mentioned fine-grained control, but keep in mind, when the customers see long lists of checkboxes about what they like and don't like, they know that the more boxes they click, the more mail they'll receive, so they'll tend to click fewer.

A method you could use would be similar to Facebook's "I like this" "I don't like this" the only problem being that you need a LOT of data (and complex) logic to implement a schema like that.

Short direct emails would be best (unlike this response). Include links to the information, although that could get your emails marked as spam.

Many people mentioned not selling the emails, I think that's a given, but the other facet is something Frakkle mentioned. Do not have any way for any person on your mailing list to glean the information about anyone else on the mailing list. Not even bccing people. Always compose individual and direct emails.

Programmatically

In this case, as with many other programming issues, use whichever service type you are most familiar with. I do not believe the differences between and ASP.NET service and a Windows service would be larger than the difference in your own skill levels.

Logging

For logging, when using a Windows Service, I've had good experience with Log4Net. In terms of (the much more important) content. You should be logging a few things (if applicable).

  1. Recipient
  2. Time Sent
  3. Content Tags
  4. Current Message Queue

1) Recipient

An integral part to log, because oftentimes errors in the 'service' are actually errors with the recipient. You can imagine the havoc that would occur if your test mailbox fills up and starts rejecting messages.

2) Time sent

Very important for obvious reasons. Most loggers time-stamp every message anyway though.

3) Content tags

If you are sending out some sort of customized modular content, then there will likely be a set of content tags based on their preferences ("VideoGames,StackOverflowNews,Lederhosen") this allows you to track in a much more fine-grained manner what could be wrong with a certain class of emails that fail.

4) Current Message Queue

Many of the problems can be enlightened by logging this value every time. It shows you the times when your program is wildly slow, and it also shows you when it is curiously faster than normal (suspiciously empty queue). More problems will be illuminated by this one than by any others.

share|improve this answer
4  
I was about to ask "Why not bcc?" but a little research showed me: "...all addresses, including BCC addresses, are included in every email as it is sent over the Internet. The BCC addresses are stripped off blind copy email only at the destination email server." +1 for something I didn't know. –  JeffH Jul 9 '09 at 16:16
    
Thanks for the heads up Gortok. Sorry I can't be any more help than that. –  Anonymous Jul 10 '09 at 14:23
add comment

The option to request HTML or plain text is important to me.

Also make sure you never send attachments.

Make sure that the reply-to address is valid and goes somewhere that is checked from time to time. Not everyone will look for the opt-out link.

Depending on your scenario, you may want to use a full on mailing list sort of thing whereby people can reply to the entire group. Whatever you do though, make sure you never use carbon copying for contacting everyone -- compose each mail individually.

share|improve this answer
    
I probably won't accept your answer unless you edit it to include other things I've brought up. Commenting so you'll update your answer. –  George Stocker Jul 10 '09 at 13:53
add comment

-The should be able to Opt-Out with one click.
-The Opt-Out Process should allow a user to opt-in if they mess up.
-You should always let the users opt-in. Do not automatically opt-in users.
-No selling or giving away email address to other sites, companies or for money.

share|improve this answer
    
I probably won't accept your answer unless you edit it to include other things I've brought up. Commenting so you'll update your answer. –  George Stocker Jul 10 '09 at 13:55
add comment

Summarizing from your question and answers:

  • opt-in only
  • "good" privacy policy, made known to users, including no sharing of emails with other parties
  • single-click unsubscribe (not reply) with easy "I changed my mind" mechanism
  • option of HTML or plain text
  • CAN-SPAM compliance for US

I'll add:

  • "Forward to a friend" option
  • "If this was forwarded to you and you want to subscribe..." option
  • An option when users unsubscribe for them to send you comments as to why they unsubscribed - often as checkboxes (comes too often, I'm too busy, I get too many emails, content is not not relevant to me, etc) and an "other reason" text box
  • Permission reminder: "You are receiving this email at <email_address> because you clicked..."
  • If user has opted for HTML, a "If you can't read this, click here to view the page online" link
share|improve this answer
add comment

Make sure your privacy statement is available before you subscribe and it mentions your e-mailing policy.

share|improve this answer
add comment

How should I track emails that are sent?

If by track, you mean tell if someone actually looked at the email then there are 2 ways (that I know of) to "track" emails.. The first is to have links in your emails that the read can go too. The downside is this only give you a recording if a read clicks on the link. The other way is to embed remote images in the email. When people view the email and if the email application actually displays the images, you should be able to look at how often the remote images where view to get a good idea of how many people are viewing the email.

Neither of these are all that great because they both have flaws but it would give you a ballpark number of views per email.

share|improve this answer
    
track here means that if I send an email to a client, I ought to log that it was sent. What is the information that I may need to log? –  George Stocker Jul 9 '09 at 12:42
    
Updated question –  George Stocker Jul 9 '09 at 14:34
    
You CAN track individual email views through remote images for example an item with unique uid for each user might have an img src="www.mysite.com/mySaleItem.jpg?uidhash=F91xKAm307nJ" –  nvuono Aug 12 '11 at 16:28
add comment

One thing I noticed that nobody suggessted is an option to choose a text or a picture containing email. I also prefer to get more smaller news since I check my email multiple times a day so it might be useful to ask the user if they want daily or weekly e-mails.

share|improve this answer
    
"Live email", or "Daily digests" is how I normally see it termed. (daily could be a variety of time increments, and occasionally has several to choose from) –  nilamo Jul 11 '09 at 6:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.