Generate html email messages
NaSPA1 - November 1, 2005 - 06:28
| Project: | E-Publish |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Description
Would be great if e-publish had the capability to generate an HTML format email for sending to a broadcast list. In theory this email would incorporate the sites look and feel into the email message allowing recipients to seamlessly jump from the email message into the site.
Radi

#1
Well I need that feature now, so I think I'll start on it. Unfortunately, the module developer seems off-lined at this point, but I am willing to help tackle this one.
I'm new to Drupal, but pretty experienced with php; nothing special, but probably able to handle this.
After a first look at the code, I'd say that adding an function for email outputting shouldn't be too hard, but I'm not sure what anybody else thinks of how to mix the mail services, and where to put these email links.
REQUIREMENTS:
i) Abstracted function so we can run it from the front end or the back end as per site discretion - right now I am just integrating admin functionality
ii) Allow for advanced email features, MIME html with embedded images and maybe mixed mime type
OPTIONALS:
i) allow for emailing of current edition ? (easy to layer abstraction for this)
QUESTIONS:
i) what to do with an empty or non-existing edition call
WILL USE:
i) probably use the mimemail module out there, although it doesn't support mixed mime
PLAN:
modify the epublish_admin to include an email form interface, and a procesor for that form
epublish_admin - line 445 - this includes the email form display
+ case t('email'):
+ epublish_form_email( $eid )
epublish_admin - line 433 - this is the email form processor
+ else if (arg(3)=='email') {
+ epublish_email_edition( {form get eid} , {form get html/plain} , {for mget all email options } )
+ drupal_goto('admin/epublish/sections');
function epublish_form_email( $eid ) {
// build the email form (I'm not that good with the form system, yet)
}
function epublish_email_edition($eid,$type, ... email options)
- get the normal output - theme_epublish_layout_regular( 'view', $eid )
- check the email options (sender, recipient etc)
- pipe the output into mimemail:
mimemail($sender, $recipient, $subject, $body, $plaintext=null)
}
#2
Not sure why this is needed.
I may nut fully understand the purpose but this page:
http://www.aguntherphotography.com/contact.htm
Is generated by simply using formmail (can be found on http://www.hotscripts.com I think).
Couldn't be any easier.
#3
I don't get it. The form on the agunther photography page emails the epublish newsletter?
I have already written an epublish patch for emailing editions using mimemail. It's not the cleanest thing written but it works reasonably well. I've modified the menu call, added two or three pieces to the admin section, and added a form for emailing (abstracted include) and a handler for emailing an edition (abstracted include.)
This is my first drupal contribution and I had to do some extreme programming with it. I duplicated the druppal theme function to avoid modifying more of the code.
I've tried to include most of the code in an additional include file for review. Some patching of the module file was of course necessary. I have included both the patched module and the include file.
comments would be appreciated.
#4
*bump*
This sounds great, but hasn't been updated in quite some time. Do you have a current patch? What is your project status?
#5
Another bump. And I'll give (or accept) a couple hundred dollars to get this for the 4.7 version of Epublish.
Agaric Design is working to find a way to get CiviMail (of the CiviCRM constituent relationship manager) available to people who can't afford dedicated hosting, but ePublish would stay an even lower cost option for distributing news well-done HTML-formatted news to subscribers.
- ben
#6
#7
Branch no longer supported.