Detect image rendering in email

I know that services like SendGrid already have built-in plugins for this. But I want to build my own, custom, module for this.

Reason why I am doing this is my application uses several different smtp servers specified by user.

Is it even feasible to create one module for different smtp servers?


Absolutely! It's relatively simple too, at the most basic level you do the following:

  • Assign every email you send a unique id, in the email place a reference to a script on your server with the unique id. (e.g. <img src=" >)
  • When /img?id=N is called have your code log the id and then serve the image.

A more concrete example in PHP would look something like:

Mail Sender:

$img = '<img src="' . generate_email_id() . '">';
mail("", "This is a test.", "Hello! I hope this test works!" . $img);


header("Content-type: image/jpeg");

Need Your Help

Is it good practice to get EF Database name via static variable

c# entity-framework

I am building a application which will be connected to different database of the same schema based on the Database choose by the user at the time of log in. All the subsequent queries will be made by

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.