Bulk Email Attachments
by Ed Sawicki
Accelerated Learning Center
Tailored Computers
September 7, 2006
You have a need to send bulk email to your customers periodically to alert them to the availabilty of a new product, service, etc. Let's suppose for this example that you want to alert them about a new brochure for a product. The brochure is in electronic form - a PDF document perhaps.
If you're like most people, your first thought is to email everyone the brochure as an email attachment. There are a few problems with this approach that we'll cover shortly. A simple alternative that few people think of is to email a link to the brochure that resides on your Web site.
There are numerous benefits to the latter approach:
- People who won't be happy to receive your email message will be less happy if you consume their bandwidth and disk space sending them a brochure they didn't ask for. These people prefer to be told about the brochure's availability; they can fetch it if they want it. It feels less like spam to them.
- Sending mail with large attachments is a sudden hit on your mail server's resources. Anytime you broadcast mail to a large list, some portion is undeliverable. Your mail server must queue these large messages for days. You need to make sure your mail server has adequate resources to handle undeliverables.
- While you're sending the bulk email, your server's ability to handle normal email traffic may be impacted.
- If you're sending bulk mail from a Linux/UNIX script, the script is much simpler when you send a link to the brochure rather than sending the brochure as an attachment. When you send an attachment, your script must deal with MIME type issues that can require much more code.
- Customers who use mail servers that limit the size of attachments may never see your brochure because your mail is rejected.
Sending a Link
If you send a link rather than an attachment, each email message is far smaller. You'll be able to send the bulk email much more quickly and be ready to deal with normal email more quickly. Undeliverable mail has a far smaller impact on your server's resources.
There is one risk associated with using links rather than attachments. You'll experience the Slashdot Effect to some degree. Some portion of the people who receive your email will want to download the brochure at the same time. If your Web server can't handle this sudden peak load, some may get frustrated and give up; they'll never see your brochure.
There are two solutions:
- You should always know in advance that you have the resources in place to support a marketing or advertising campaign. This means having some geek do the math to ensure your Web server can handle the expected response.
- You can throttle the bulk mail to a rate that ensures that the Web server is not overloaded. This also helps lessen the impact on normal email activity.
Implementation
Implementing a link-based bulk email system is not much more difficult than attachment-based email. The Web server side of things is trivial. Just drop your brochure file into a predesignated directory; suppose it's the brochures directory beneath the Web server's DocumentRoot. Suppose the brochure is a file called binford4000.pdf. Your customers can download and view the brochure with a URL similar to this:
http://www.example.com/brochures/binford4000.pdf
This is the URL you embed in your bulk email message. Your Web server will automaticaly determine the MIME type for the file.
Your biggest job is to work out a way for users to place their files in this directory securely. They can do this using a secure file transfer protocol like SCP or SFTP. If the users are non-technical Windows users, a graphical SFTP program may be best.