Hi Guys,
Quick one...
Am just finished doing some modifications to an existing mail.module that I would like tested and some minor help with before creating a patch.
The functionality of mail.module is as follows:
- Allows a site administrator or a user with the correct permissions to send a plain text email to every registered member of a drupal site or only to members with a certain role type.
The modifications allow you to :
- send an enhanced HTML email or a plain text email.
- attach a file to the email*
- specify a different character set for the mail (useful for languages with special characters)
- Specify if you want a "READ RECEIPT" send back to the site admin.
- Specify a priority for the email (highest - urgent - normal etc.)
* at the moment you set the file to be attached under ADMIN/SETTINGS. Not ideal, I know. I'm looking for assistance on how to pull a node attachment into the email instead.
To get a copy of the module (tested already in drupal 4.6.0 and email programmes including hotmail.com, outlook, eudora and phoenix) click on the following link:
To install, simply unrar or unzip the file and upload to a modules/mail/ folder and
enable using ADMINISTER --> MODULES page.
INSTALLATION & SETUP
Do not use this beta model to send a mass mailout on a live site without testing first!
- Download and uncompress either the ZIP or RAR file linked below
- Recommend you set up a "test email" role type with just you as a member.
- Go to ADMINISTER -->> SETTINGS -->> MAIL and configure your settings/file attachment/character set etc.
- go to CREATE CONTENT -->> MAIL to send a mail.
Please report back any errors if any. I have tested this on drupal 4.6.0 and it works fine.
Finally if anyone an help with making the file attachment more fluid and user firendly, please give me a shout...I'm stumped on how I check if the node ahs an attachment and pull out the file name and path to attach to the email.
---------------------------------------------------------
download a beta enhanced Mail.module for drupal 4.6.0.
ZIP VERSION:
http://www.m3m.eu.com/drupal-stuff/mail_module_test.zip
RAR VERSION:
http://www.m3m.eu.com/drupal-stuff/mail_module_test.rar
==============================================
Cheers guys..hope others find it useful....any suggestions welcome..
Dub
Comments
apologies..
Screwed up on the formatting and forgot we can't edit the first post in a thread...DOH!
One important note that needs flagging.....the mail.module remembers the last attached file. I was using it to send a standard newsletter PDF each week and I just overwrote the current version for the mailout.
hope the above makes sense and you have time to download and use it.
Dub
DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
Windows-1251
Hello! I need this module, but can you provide support for cp1251 encoding? UTF-8 e-mails are incorectly displayed in user's mailboxes (not with this module, with default e-mail module).
Have you tried using this module?
Hi Teri,
I can look into the encoding thing for you....if needed. This (modified) module already comes with utf-8 encoding and bypasss drupals normal email send routine when sending an email broadcast.
Can you test it with the existing compression options and let me know if it works okay ?
Dub
DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
Buggy email client
If the UTF-8 encoded mails that Drupal sends out are not shown correctly, the fault is most likely with the e-mail client. What problems are you experiencing? Drupal's core should send out correctly encoded mails.
--
If you have a problem, please search before posting a question.
I have problem wit UTF-8,
I have problem wit UTF-8, becouse most of users have setup of their mail clients with windows-1251 character set, and when they get UTF-8 formatted message they don't know how to change the encoding. This problem ocurres with Thunderbird, Outlook and some bulgarian web e-mail services. With Gmail and Yahoo letters are OK.
But when I send messages to my users, they mail me back with suggestion to correct my system to send cp1251 messages.
Great code !I tried it and
Great code !
I tried it and it works well for me.
I noticed a few things...
1. It would be great if a link was also placed in the email saying:
Read this email online: http://example.com/node/123123
2. It saves the mail as a node, that can be categorized - Great !
But if I want to update the node sent, I'm forced to specify a role to send it to again, even though a second email is not sent out.
Really Great stuff !
http://01debug.com
http://goingtochina.com
great idea..
Thanks mp...
Have had a few emails mentioning similar...(please post requests back up here..easier for me to keep tabs on whats needed to be done)
As an addendum, what I'm thinking of doing is the following:
(a) add in an extra "mixed format" option...i.e. where a TEXT ONLY part of the email can be set combined with the HTML..so people with email programmes that cannot see the HTML, will automatically see a text only version with a full HTML version attached and/or a link to the node.
people able to see HTML won't see the PLAIN TEXT teaser and will see the full HTML email.
This is a lot of work, but, worth it I think as a lot of people check their emails using mobile phones/pdas and wireless devices these days so the MIXED format is useful for keeping in touch.
(b) have been testing a BULK SMS option for the mail.module...i.e. you have the option of sending a message via email or a message via SMS if you have been gathering mobile phone numbers on the site.
(c) I'm not sure how I could add in a RESEND button on a previously sent MAIL node. I tend to use a template that adds in a users photo and some dynamic details into the email so I simply open up the previous mail and paste the html into a new mail node.
(d) Personalising emails is very effective....such as inserting some of their profile details can be very useful...such as their Photo, or their "member details" etc. So I'm planning to extend out the variables made a vailable to the mail.node to be more flexible.
The urgent element is making a connection between an ATTACHED file to the node, rather than setting a custom link in the ADMIN -->> SETTINGS -->> MAIL page
Does anyone know how to run an SQL query that will do this (sorry if this sounds stupid, but I'm not an expert)
Step 1. Check to see if the node has an attachment.
Step 2: get the attachment details in such a way as I can assign variables like:
Appreciate any pointers from an SQL gurus out there..
Dub
DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
Your options sounds
Your options sounds good, maybe you want to remove the requirement to select a role when updating.
http://01debug.com
done..
HI mpamphile..
Just thought I'd flag the fact that editing the node and sending again, works. the other request for a url automatically sent in the mail is tricky...probably better just to put that in at the bottom with you're email...
Hope that makes sense...Nedjo has applied the updates to the new version of mail.module.
I'll revisit the SMS option later.
Hope that makes sense..
Dub
DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
I've added some tweaks
Thanks for the fine work. I've made a few minor changes and posted them to the original issue.
My comments
Very nice.. Seems to work.
On my copy I decided to make a change to "mail sending options" where the first option says something like "send a copy". I thought it made more sense to say something like "Select to Email post (otherwise will only go to archive)". It took me a while to figure out that I had to have it checked to send out my post.
The other thing I want to change is allowing a person to not receive a posting - even if it is coming from an administrator. Where do I find this?
Thanks again for the great work.
error ...
Hi, I love the mail module! When I use it, it does send the mail, but then it loads a page with the following error:
warning: Invalid argument supplied for foreach() in /modules/mail/mail.module on line 295.
warning: Cannot modify header information - headers already sent by (output started at /includes/common.inc:320) in /includes/bootstrap.inc on line 701.
Help? Thanks!