Tuesday, October 16, 2012

Sending emails–not as easy as you think

I am just doing the last few lines of code for my new site (To be released very soon), part of every site is the ability to send emails to your customers.

I will start with 1 important line – “The communication with your customers is the key for success and as such you need to ensure that you have the right infrastructure”

You might want to use your native SMTP on your ISP/Host, and have write fancy code that will manage delivery, OOO operations, Unsubscribe, Report on delivery, track clicks, bounces and the list can continue

But before you do that remember the first syntax and understand that to write such infrastructure you need deep understanding and tons of line of code and time, which no one has.

Another alternative is to integrate into online infrastructure (using SMTP, Rest api, etc) and get all the above features for small price between 10$ – 80$ for small business depend on usages.

I decided to use SendGrid because it was free for my usages, but there are other companies like MailChimp, etc

 

While writing the small piece of code that just send the messages using SendGrid SMTP, I face few road blocks:

  1. My email went to the SPAM folder
  2. When I finally got the email it was badly formatted without style sheet

You really need to read some articles that talk about how NOT to go to the SPAM folder before you write emails and as for the styling I found out that there are many constrains for HTML in emails

Luckily there is a good site called PreMailer that enables you to convert HTML page or text into a well formed email with inline stylesheet as needed and it will also alert you on risky in your current stylesheet

After all the above the key was to TEST-TEST-And TEST again, which is pretty weird when you think about it, since you see the output but you can never know what will happen

2 comments:

Ran Davidovitz said...

i moved to MailChimp - free authentication and simple setup

Topazine said...

I found you through "Next Blog" on blogger. I used to work in IT a long time ago with programmers and business systems analysts. I thought my remedial grasp of Cobol was a great achievement... And that's as far as my brain could go. So I went back to college and became an artist. It was nice reading your page. Brought back memories.