[development] HTML emails

marolijo - Pol Maresma marolijo at yahoo.es
Wed Jul 16 09:35:51 UTC 2008


I tried it but nothing... 

Where on the database can I delete the module references? Will it work?

Thank's

-----Mensaje original-----
De: development-bounces at drupal.org [mailto:development-bounces at drupal.org]
En nombre de Omar Abdel-Wahab
Enviado el: dimecres, 16 / juliol / 2008 11:23
Para: development at drupal.org
Asunto: Re: [development] HTML emails

+1

I strongly would love to have D7 send HTML e-mails.

At least 20 modules will benefit from this step.

Omar

Matt Connolly wrote:
> I haven't looked at drupal 7 yet, so I'm throwing this out there for 
> discussion.
> 
> The D6 mail api seems like it's pretty much designed for plain text 
> emails, however, a module's implementation of hook_mail can clearly 
> set the headers of the mail to "Content-Type: text/html; 
> charset=utf-8" and send rich text.
> 
> For example, I'm looking at using "forward" module for the "email this 
> page" link on a node, and the "simplenews" module, which uses "mimemail"
> to send rich emails, including attachments. Both "forward" and 
> "mimemail" modules create a html header.
> 
> The problem occurs when a module implements "drupal_mail_wrapper()" to 
> build a html header when hook_mail has already done that - you can 
> easily end up with bodies like:
> 
> <!doctype... <-- from drupal_mail_wrapper() <html> <head>...</head> 
> <body><div....
> <!doctype. <-- from hook_mail()
> <html>
> <head> ... etc.
> 
> 
> Because there are two opportunities to create the html "head" for the 
> message: in hook_mail and drupal_mail_wrapper.
> 
> I'm throwing this out there for discussion, I think that the hook_mail 
> should construct the message in a similar fashion to the Form API, 
> specifying a theme for rendering the body part of the message (ie what 
> goes in the <body> tag) and anything special that needs to go in the 
> head as attributes.
> 
> That way the message can be constructed only once.
> 
> Besides, email clients have been HTML friendly for a *long* time, so I 
> don't see why Drupal shouldn't have an interface that understands rich 
> email messages.
> 
> Thoughts?
> 
> 
> Matt
> 
> 

__________ Información de NOD32, revisión 3270 (20080715) __________

Este mensaje ha sido analizado con  NOD32 antivirus system
http://www.nod32.com





More information about the development mailing list