Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is anyone busy making a Drupal 7 version for this module?
Comment | File | Size | Author |
---|---|---|---|
#31 | mimemail.939208_02.patch | 2.12 KB | sgabe |
#8 | mimemail_939208_01.patch | 48.47 KB | sgabe |
Comments
Comment #1
Jelle_SComment #2
sgabe CreditAttribution: sgabe commentedAre you? :)
Comment #3
sgabe CreditAttribution: sgabe commentedI have merged HEAD into the DRUPAL-6--1 branch, so we can work on HEAD for the Drupal 7 port. I started to work on this a few weeks ago and I have some ideas but nothing solid yet. I'll try to post some more here when I'll found the time for it.
In the meantime you can share your thoughts here about Mime Mail for Drupal 7.
Comment #5
chx CreditAttribution: chx commentedTask title: Port mimemail to Drupal 7
Task description: This module allows Drupal to send HTML mails. It is the 66th most used module with more than 20 000 sites using it. The task is to port the module to Drupal 7, by performing the API changes outlined in the resources to get the module to work properly. By doing this task you will learn about the brand new Drupal 7 API and Drupal mail handling.
Deliverables: The module working with Drupal 7 and also either automated tests or documentation why that's not feasible.
Resources:
Comment #6
dmitrig01 CreditAttribution: dmitrig01 commentedAnother resource: http://drupal.org/node/900794
Comment #7
chx CreditAttribution: chx commentedadding mentor needed tag.
Comment #8
sgabe CreditAttribution: sgabe commentedI've got a patch against current DRUPAL-6--1 branch. I tested only with the core Contact module, since Simplenews and Webform seems to be unusable ATM. It can be a good start if you would like to play with it.
Comment #9
miro_dietikerI'm glad mimemail goes D7. We're going to test it extensively with simplenews for D7 development within the next days.
Why not just pushing the patch into CVS to proceed in separate steps?
Is there something missing or todo?
Comment #10
Andy B CreditAttribution: Andy B commentedsubscribing
Comment #11
Andy B CreditAttribution: Andy B commentedChanged title for better use in the dashboard.
Comment #12
sgabe CreditAttribution: sgabe commentedThis is the Mime Mail module. :)
Comment #13
Andy B CreditAttribution: Andy B commentedUh, OOPS! Was thinking of mimedetect when posting.
Comment #14
sgabe CreditAttribution: sgabe commented@miro_dietiker: There are some modifications included in the patch which could use some discussion.
mimemail()
accepts a tenth parameter $send, like drupal_mail()hook_mailengine()
the 'name' and 'description' operations are merged into one 'list' operation.I didn't have the time lately to finish it, but otherwise it seems okay. I guess it could be committed without these modifications and we can continue in separate issues, but I'd be happy if someone reviewed it before commit.
Comment #15
Sylvain Lecoy CreditAttribution: Sylvain Lecoy commentedsubscribing
Comment #16
lolandese CreditAttribution: lolandese commentedSubscribe
Comment #17
achtonsubscribing
Comment #18
webankit CreditAttribution: webankit commentedsubscribing
Comment #19
sgabe CreditAttribution: sgabe commentedI decided to take the first step and commit something at last, so we can really start thinking about Mime Mail for Drupal 7.
In Drupal 7 you can use drupal_mail() with different mail systems for any mail provided by hook_mail(). Since drupal_mail_system() will determine the responsible system for your message, in order to use Mime Mail for your emails you need to modify the
$mail_system
variable like this:Make sure to not overwrite the whole array just append your mail to it! See the function documentation for more details.
The mimemail() function is removed in favor of drupal_mail(). Now $params should contain the optional $plain, $plaintext and $attachments variables, the module will pick them up from there. You can set these either before calling drupal_mail() or in hook_mail() and of course hook_mail_alter().
The development branch contains the following patches made for 6.x-1.x-dev:
And some other changes, that I simply can't enumerate.
I have tested with core Contact module as default system and Simplenews (modified according to above) as responsible mail system for it's messages.
It seems to work fine for me, so enjoy and let me know what you think. The changes will be available in the development snapshot tomorrow.
Comment #20
quicksketchThanks for your work on this sgabe. The D7 version sounds very interesting. Could you update the README.txt file with instructions on how to both install the D7 MIME Mail as well as use the API?
Comment #21
perarnet CreditAttribution: perarnet commentedsgabe: Thanks for the work, could you perhaps attach a patch of the modified simplenews changes?
Comment #22
sgabe CreditAttribution: sgabe commentedUnfortunately I don't have time to create patches, but I will update and add some instructions to the README.txt as quicksketch requested.
Comment #23
sw3b CreditAttribution: sw3b commentedSubscribe !
Comment #24
karbofos CreditAttribution: karbofos commentedsubscribing
Comment #25
sgabe CreditAttribution: sgabe commentedI updated the README.txt with some information. I don't know if that's enough, so please ask if needed, I will try to help.
Comment #26
joostvdl CreditAttribution: joostvdl commentedsubscribe
Comment #27
3n9 CreditAttribution: 3n9 commentedsgbabe, could you post a working example how to send html email from our own modules? Like: http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail...
Comment #28
sgabe CreditAttribution: sgabe commented@3n9: I think there is nothing to add. You can use drupal_mail() like you did so far. The difference is that drupal_mail() can retrieve the responsible implementation for the message and send it using that system. So, you need to modify the mail_system variable as I mentioned above.
However, the system actions and the Rules integration in the module should be a good example.
Comment #29
quicksketchHi guys, if anyone can provide some help I'm not able to figure out how to use MIME Mail in Drupal 7. I'm a pretty smart guy, but either MIME Mail isn't ready for use or there's some kind of trick to using it. Since the whole system is undocumented (AFAIK), it's hard to tell which is the case. The new README.txt is not helpful from a developer-standpoint of how to integrate with the module. The issue for Webform is over at #1043086: Include attachments and HTML e-mail options not working (MIME Mail integration). Any help would be appreciated.
Comment #30
sgabe CreditAttribution: sgabe commentedI have attached a patch for Simplenews in #1048254: Support Mime Mail on Drupal 7, I will take a look at Webform too ASAP to help you move forward with this issue.
Comment #31
sgabe CreditAttribution: sgabe commentedI have attached a patch for Webform in #1043086: Include attachments and HTML e-mail options not working (MIME Mail integration), I hope that helps. I would appreciate if anyone could let me know what to add to the documentation. I thought that it's clear but clearly it isn't. Sorry, it's my bad...
Comment #32
sgabe CreditAttribution: sgabe commentedWe have an initial port of Mime Mail for Drupal 7. Let's continue in separate issues.
Comment #33
cwyant CreditAttribution: cwyant commentedsub
Comment #34
triple5 CreditAttribution: triple5 commented