For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > January 2005 > Re: [SMARTY] Re: sending emails using my smarty templates









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] Re: sending emails using my smarty templates
Abdul-Wahid Paterson

2005-01-17, 8:57 am

Hi,

> Extracting the images to send them in HTML e-mail messages it is not
> trivial. It is probably simpler to prepend an HTML <BASE> tag to specify
> the base URL and let the receiving mail client resolve the images URL
> automatically.


Agreed, only it is in my project specification that the images should be inline.

>
> Here you may find an example of how to compose and send HTML messages
> with alternative text parts using Smarty templates to generate the
> HTML part and the text alternative part:

meta-language.net/metastorage.html

Actually, I have used the Pear MIME class for this quite successfully
but only for non-Smarty pages. For that though I had to functions; one
for normal browse HTML and the second for the email HTML. However, it
caused a lot of code duplication and was a pain when I needed to make
changes as they changes had to be made in both places. I am thereore
hoping that I can find a good method in smarty where updates to the
template are easy and changes to the code can be done in just one
place.

I will give it a bash. Thanks for the advice. ;)

Abdul-Wahid
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com