Re: [SMARTY] sending emails using my smarty templates

From: Date: Mon, 24 Jan 2005 10:48:15 +0000
Subject: Re: [SMARTY] sending emails using my smarty templates
References: 1 2 3 4 5 6 7 8  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12200@lists.php.net to get a copy of this message
Hi, > It's not hard to do, especially with packages like PEAR's Mail_MIME. > However, my personal view is that this is a complete waste of bandwidth. > The files are already available off your site, and most people read mail > while connected to the internet -- so those images will be available. While I agree with you in some cases, it does really depend what type of email you are sending and there are some other factors to take in to account: 1. If the email is generated particular for this user and is not a bulk email. The images might be different and thefore you are not really saving much bandwidth as either way the user is going to get the image from you. 2. If the images are relatively small, it is not much overhead when downloading/sending emails. 3. Sites that change content frequently or where users need to reference back to emails after a few weeks (or even months), might find that the content has changed and therefore non-inline images don't appear properly. 4. Some email clients don't automatically load images from webservers as users are worried about increasing their spam. In fact, it is probably not a good idea to have your email client to download images automatically if you don't want to attract spam. As such, many emails with images on the server, may find that the users never actually see the image. I know this is the case where some companies send me HTML emails. I never bother downloading the images and they would have done better sending me text as their emails would be more readable. > Additionally, image attachments are often a large factor in how > spam/virus scanners determine whether or not a mail may contain a virus > or spam (HTML mail is as well, which is why you should send HTML mails > as multipart/alternative with a text/plain equivalent alternative); why > risk having your mail quarantined right off the bat? > In my experience this is only a problem if you only include HTML and no text alternative and that you use proper MIME headers. In this project, I have one set of code and 4 smarty templates: 1. generates normal HTML for the web, 2. generates a printer friendly page, 3. generates HTML for an email and 4. generates a text version of the page. I then use Pear Mail/MIME to send the emails including the HTML and text parts. I have not had a problem. I have not had a problem with my email being classed as spam (and I have been doing this without smarty for about 3 years with 50,000 users). Regards, Abdul-Wahid

« previous php.smarty.general (#12200) next »