Is there any plan for Drupal 5.0?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nedjo’s picture

Title: Mail for Drupal 5.0? » Upgrade mail for 5.0
Version: 4.7.x-1.x-dev » master

Yes, I plan to upgrade this when I get a chance. That said, it won't be for a while yet - I need to work first on some higher priority (because more used) modules first. So I would greatly welcome anyone wanting to take on this upgrading and post a patch here.

I'm not very satisfied with mail.module. Yes, it's useful on small sites, but it doesn't scale. It also has other problems left over from the 4.7 upgrade, particularly relating to styling and paths in html mails. I've never used mail.module for anything but testing, so I'm not familiar with its performance. I'm somewhat dubious about the external mailing class used in the module. There are no known issues, but at the least it should be upgraded to a newer release.

An ideal 5.0 upgrade, I think, would begin with looking closely at other options, e.g., Mime Mail and Send. Could mail.module functionality be rolled into Send? Could it have Mime Mail and/or Send as a dependency?

NoahY’s picture

FileSize
4.79 KB

Hi,

I just created a mass mailer for Drupal 5.0, which sounds similar in function to (but more limited than) mail.module.

All I did was took the core contact module, copied it over to mass_contact, and tweaked it to send mail from the admin to registered users based on their roles (or to everyone). Simple, functional, it's what I needed anyway. Maybe some of the functionality from mail.module could be incorporated? Especially saving messages as nodes.

Anyway, I've included the code. Up and running with Drupal 5 RC 2

lias’s picture

I was looking for the email to registered members capability and found your mass_contact.module. It seems to be working as expected on my drupal 5.0 site, I've tried sending it to myself and received it just fine. I've yet to send it to authenticated users but will be doing that soon.

I was wondering if there would be a way to allow folks to opt-out of this mass contact email. I believe it's a requirement these days.

Thank you very much for your work on this module. You couldn't have posted it at a better time, for me at least!
Lsabug

ivko’s picture

To yuttadhammo:
Thank's. I've found mass_contact.module very useful for me (more useful then original mail.module).
But there is small bug - there is an extra comma at the end of recepients list, therefore some SMTP servers return this error:
warning: mail() [function.mail]: SMTP server response: 553 5.0.0 <>... User address required in C:\mywww\root\drupal5-01\includes\common.inc on line 1970.

I resolved it by changing line #398 to
$recipientout .= (empty($recipientout)?"":", ").$rnamea." <".$rmaila.">";

lias’s picture

Do you mean you changed this line:

$recipientout .= $rnamea." <".$rmaila.">, ";

to this?

$recipientout .= (empty($recipientout)?"":", ").$rnamea." <".$rmaila.">";

Just wanted to confirm. Thanks.

NoahY’s picture

FileSize
5.46 KB

Sorry, lots of problems in the mass_contact module. Try this update. It seems to work quite well now, and I've included node-type and node-per-message capability. Make sure you delete the module and reinstall it to create the new node type.

Also sorry to hijack this topic - I probably should have opened a new node...

NoahY’s picture

@lsabug - re: opt-out requirement - I didn't know that... I suppose a check-box on the profile and registration forms allowing the opt-out, and a routine in mass_contact.module to check. I'm not sure how to add to profile forms... on install, or inside the module script?

NoahY’s picture

FileSize
5.46 KB

Sorry, above file is broken - have to take out the string "_really" from the submit function. Here's a fixed version. Also, working on the opt-out now. I've applied for a CVS account, and will open a new module page ASAP.

NoahY’s picture

FileSize
5.92 KB

Here's a test [That was quick] for the mass_contact with an opt-out in the user profile under the tab "submissions". I don't know the best way to reinstall this - I suppose the update.php will recreate the database.

NoahY’s picture

Sorry, that doesn't work... misunderstood the code. This should work for both global and role-based forms.

NoahY’s picture

Tsk, tsk... another mistake... I edited out the send mail call. The last archive will not actually send mail to your people, it will only pretend to... another patch, to line 420. Edit out the "//" in the above file to make line 420 read as follows:

drupal_mail('mass-contact-page-mail', $from, $subject, $body, $from, $headers);

Yes, yes, I've applied for a CVS account. No answer yet. Now I'm working on a confirm page to break up the submit process - this after sending a message with the word "Test" in it to my entire subscription base :(

lias’s picture


Hi there and thanks for all of your work getting this to function!

yuttadhammo should I go ahead and try out the latest version you've posted on my production server?
lsabug

NoahY’s picture

@Isabug - I am using it on my production server with no adverse effects. It shouldn't conflict with any other module, and I am still able to use the site-wide contact form to contact the admin (me). At worst, you can post any problems here, but I don't think you will encounter any.

Please make sure to test it by creating a user, giving them a unique role, creating a mass mail category which sends only to that role, and send a mass email to that person (you have to enable the mass contact menu item, I think, or go to www.yoursite.com/mass_contact). Only the administrator can send mass mail unless you give permissions to others.

NoahY’s picture

Until I get a CVS account, here is the working version of the entire module in a gz format. The previous version has another bug with the opt-out - if you opt back in, it still think's you've opted out. Or I guess it just doesn't think... that's the problem with these machines... :)

Wait, no more gzip uploading... strange... well, here's a link to my website with the latest version:

http://pali.sirimangalo.org/files/mass_contact/

genemcc’s picture

Category: feature » bug

Many thanks for this excellent module!!!

I found a bug reported to me by my Outlook users. Apparently the link back to the originating site includes the p tag resulting in a link not found error.

I removed the tag in line 358 so now it looks like:

	357:  // Compose the body:
	358:  $message[] = t("!name sent out a group email from !site.", array('!name' => $form_values['name'], '!site' => url(NULL, NULL, NULL, TRUE)))." ";

That solved the problem.

Thanks again!!!

NoahY’s picture

@genemcc

That's funny, I just slipped that

at the last moment and didn't check to see what it would do. For some reason I thought there was a missing \n\n in there - AFAICS, there wasn't. Fixed on my website, follow this link again:

http://pali.sirimangalo.org/files/mass_contact/

to get the entire module including this bugfix.

The module is just modified from the core contact.module, so I'm not sure how much credit I deserve - thanks for the feedback though :)

NoahY’s picture

Well, that's that... no go on the CVS account. Here's the reply from drupal:

We try where possible to avoid duplication. Please try to get your improvements into the existing modules that provide this functionality.

So, I don't know if Nedjo is still following this, but maybe I could ask whether my module could be incorporated into the Mail module, or whether it is really superfluous. What I like about it is it mirrors very closely the core contact module, so should be able to upgrade easily, and is assured to be very much in line with the core code api.

I'll leave the code on my site for a while anyway, but here's hoping it will get hosted on drupal by someone with a CVS account.

genemcc’s picture

Category: bug » feature

Hmmm... That seems odd. Why can't CVS have a representation of different approaches to issues. Your module works very well and is available for 5.x now while the Mail Module is still not available. I think the community would benefit from both collaborative approaches (as the message about your CVS account says) AND independent approaches. All of these should be available from this source (drupal.org). Perhaps an alternate approach CVS is in order?

nedjo’s picture

Hi yuttadhammo, I would be happy to talk about adapting your module as a new iteration of mail.module, particularly if you were committed to being a maintainer. Please contact me offline to discuss this.

nedjo’s picture

Moving to http://drupal.org/node/114293, Refactor mail.module based on contact.module.

deekayen’s picture

Status: Active » Closed (won't fix)

skipping to D6; see also http://drupal.org/project/mass_contact
please re-open non-mass_contact content under separate issues

deekayen’s picture

For all those subscribed to this issue, I'm looking at a mime replacement for the existing one in Mail so the module can use drupal_mail instead of PHP sockets as it does now. Toss in your candidates for a MIME library since otherwise I'm inclined to shoe-horn this into working with the mime_mail module.

nedjo’s picture

Mime Mail looks like a good idea, see my first comment on this issue .