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:
<img src="https://example.com/img?id=1 >
)/img?id=N
is called have your code log theid
and then serve the image.A more concrete example in PHP would look something like:
Mail Sender:
img.php: