By JBxFINAL on
Hi,
First off thanks drupal team, very nice piece of software.
I was hoping for some help to change a few things.
Every member of the site I'm working on has a text pager that can recieve emails, however the subject line of drupal sends tons of garbage that makes the page unreadable. Where could I modify the thing that sends out emails? I would like to also make it where members cannot change their email addresses and so that a requested password can only be retrieved by typing in the correct email (not just username).
Thanks a lot!
Comments
user_mail_encode()
Check user_mail_encode(). In the CVS version, we do not use the UTF-8 escaping unless necessary:
Forgive me, what file would t
Forgive me, what file would that be in?
Also I am using version 4.4.0, as I use fantastico in cpanel.
Code fix for email subject line garbage
I was after the same fix... as it turns out, most of the spam filters reject the emails from Drupal if they have the garbage subject lines, and I was unable to use Drupal until I got it fixed (as no one would ever get their registration/password emails, welcome emails, etc.). Thanks to the clue above and the correct code (above) help, I was able to find and fix it. Now my group loves Drupal. :)
For you non-programmers, the file is "modules/user.module". At line 246 (in ver 4.4.2, other versions may be a different line number), update the user_mail_encode() function so it looks like this:
As always, the brackets and punctuation are critical, make sure they are exact. Save the file and run Drupal, and you'll find the subject lines come thru just fine.
Hope this helps.
Cheers!
For the benefit of us non-pro
For the benefit of us non-programmers, could you submit this as a bug/feature report against core? Perhaps they could add a setting for this so that people don't have to edit files, just choose a setting...
It would be great for 4.5
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Already in
As I said, this is already in CVS/4.5.
doh, missed that in your post
doh, missed that in your post. Or forgot by the time I read the last.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
But not at drupal.org
I wish that it were in here at drupal.org
(i.e. I signed up today and got a UTF-8 subject message)
Glenn
To be fair, 4.5 hasn't hit co
To be fair, 4.5 hasn't hit code freeze yet. So while they generally do run on the latest, let's not run the production site on development code when there is no code freeze. :)
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Oh, I do agree... I was just
Oh, I do agree... I was just viewing this as a "patch" that should be applied (whether it is technically a patch / bug-fix or not). To me, it's a "bug".
Glenn
Spam filters
I must say that I think the choice of spam filters to see encoded subjects as spam is a bad one. Only unaccented english matches that. Encoding subjects is perfectly legal according to the RFCs.
Yes it is (I admin a decent s
Yes it is (I admin a decent sized email system in my day job) but I suspect that there are several other factors. The encoded subject may just be one scoring part of a filtering system. ie, no reverse lookup.... multiple host server that was banned, no MX record, etc. Other content filtering, size of the message, sending name meets filter x criterea....
For email to pagers it may be part of a filtering system to protect pagers from getting garbage characters (at least in the USA where English centric little flexibility is often found).
-Steven too....
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Choice of spam filters
And, of course, I have little control over the spam filters that my clients, users and thier ISP's are using...