Bad parameters to mail()

huss - September 19, 2006 - 00:20
Project:Drupal
Version:6.12
Component:language system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I've installed Drupal 4.7.3 and subscriptions.module.
Everything runs well, but when i have to receive notification of a comment for a blogq Drupal shows following message:

warning: mail(): Bad parameters to mail() function, mail not sent. in /www/horizonti.bg/www/root/drupal47/modules/user.module on line 410.

This message occurs only when the subject contains cyrillic letters.
The same problem occurs when drupal sends notification to the newly created user with cyrillic characters in the subject of the message.

#1

drewish - September 19, 2006 - 00:42

What version of PHP are you using?

#2

huss - September 19, 2006 - 18:15
Title:warning: mail(): Bad parameters to mail() function, mail not sent. in /www/mysite.com/www/root/drupal47/modules/user.module on» PHP Version 4.3.11

PHP Version 4.3.11

#3

huss - September 19, 2006 - 18:22
Title:PHP Version 4.3.11» warning: mail(): Bad parameters to mail() function, mail not sent. in /www/mysite.com/www/root/drupal47/modules/user.module on

Sory! In the previous message I changed the title of the issue and couldn't restore it. But now the issue has the same title.

#4

netbjarne - October 5, 2006 - 13:08

Oh man - just spend 6 hours on a day off to narrow this down.

I can confirm that there indeed is a bug somewhere.

Symptom:
If sitename in /admin/settings contains national characters, in my case "æ", mailing of login info etc from the user module fails with this error:

mail(): Bad parameters to mail() function, mail not sent. i /hsphere/local/home/oldrup/kegnaes-friskole.dk/modules/user.module på linje 430.

User.module version info:

// $Id: user.module,v 1.612.2.16 2006/08/02 18:13:27 killes Exp $

PHP Version: 4.4.4

Workaround:
Avoid using national characters in sitename. If I replace "æ" with "ae" in my sitename, the user module can once again email.

I can reproduce this error on several installations. Any help is greatly appreciated.

#5

netbjarne - October 5, 2006 - 13:28

A small side note, the contact module has not got the same problems with national characters - I have been sending several messages using the contact module, which included "æøå" and such in the subject line - all went through fine.

Please let me know if I can provide any useful info to help get this fixed. I'd really like my site to have the correct name ;-)

#6

netbjarne - October 9, 2006 - 07:15

Screenshots and phpinfo attachments for more details

AttachmentSize
shot-1-succes.JPG 99.68 KB

#7

netbjarne - October 9, 2006 - 07:16

Here the second screenshot where mailing fails due to national characters in sitename.

AttachmentSize
shot-2-error.JPG 116.69 KB

#8

netbjarne - October 9, 2006 - 07:16

Lastly, phpinfo dump.

AttachmentSize
phpinfo.htm.txt 45.7 KB

#9

netbjarne - October 9, 2006 - 09:33

More diagnostic results and a better workaround.

I found out that BOTH the user.module AND the contact.module, uses the user_mail function from the user.module to send emails. The contact.module succeeds, the user.module fails - sending emails the email subject includes national characters.

The subject line of emails sent by the user.module, can be modified in the administer >> settings >> users menu. If having a sitename with national characters, you can replace every instance of %site in the text fields, with plain ascii instead.. Please see screenshot.

AttachmentSize
workaround.JPG 127.47 KB

#10

greggles - October 21, 2006 - 14:50

Following on netbjarne's work...

In contact.module we have this subject:

383 : dries 1.65 $subject = '['. variable_get('site_name', 'drupal') .'] '. $form_values['subject'];

In user.module we have a subject that depends on the reason it is being sent, but they all looks similar to this:

1513 : unconed 1.655 return t('Account details for !username at !site', $variables);

Note that I'm pasting from annotate view so we know which line/commit is involved.

So, it seems to me that by using different methods of variable insertion into the email subject we are getting this different behavior of the mail succeeding in one case and failing in another.

In both cases we use drupal_mail to send the messages. Perhaps some cleanup of the subject would be appropriate in there, but I'm not sure what kind of cleanup is necessary.

#11

scor - December 4, 2007 - 19:33

Hi,
I have the same problem on a unix php 4.4.3 server. I recently migrated from php 4.4.1. which never caused this problem.
This problem occurs whenever the subject of the email sent by the server is longer than 46 characters and contains national characters. I also managed to get this message with contact module, when the subject of the email is long enough.
In the mime_header_encode function, when the subject of the email contains national characters, the subject is encoded in base64 by chunks of 47 characters. If there is only one chunk, there is no problem, the email is sent with the encoded subject. But if there are more than one chunk, a line break is put at the end of each chunk. I guess it's to comply with the rfc2047 :

An 'encoded-word' may not be more than 75 characters long, including
'charset', 'encoding', 'encoded-text', and delimiters. If it is
desirable to encode more text than will fit in an 'encoded-word' of
75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may
be used.

Now, this is what the php mail function says about the subject of the email :

subject

Subject of the email to be sent.

Caution

This must not contain any newline characters, or the mail
may not be sent properly.

and it doesn't mention anything about the encoded subjects.

When I look at the source of some emails sent from a config which works (unix php 4.3.11) with a long subject with national characters, the line breaks of the subject have been deleted (by the mail function I assum). All the base64 chunks of the subject end up on the same line with a SPACE between each of them, so I figured there was no point to have the line break in the mime_header_encode function and decided to remove it.
The line break is added in unicode.inc, line 232:

      $output .= ' =?UTF-8?B?'. base64_encode($chunk) ."?=\n";

I deleted the "\n" and it worked. The only thing is that the email sent doesn't comply with the rfc2047 since all the chunks of the subjects are on the same line, but it was already like that before on the working config. Try to send a message with contact module with a long subject like this :
Le sujet de ce message est très long!
even drupal.org puts all the chunks on the same line!

I'm not sure what triggers this problem (version of php, mb_string settings) but check your config and post more details about it!

#12

killes@www.drop.org - December 11, 2006 - 20:36
Version:4.7.3» 5.x-dev

moving to HEAD since user_mail hasn't changed. But apparently PHP has(?).

#13

greggles - December 11, 2006 - 21:15
Version:5.x-dev» 4.7.x-dev

Steps attempted:
1. send a message on the sitewide contact with subject containing: på and æ.
2. set sitename to contain æ
3. send message on user personal contact form

Expected results:
Error messages

Actual results:
Mails went through, no errors printed to screen nor watchdog.

My tests were only on Drupal5.x head as of today, so I imagine this is Drupal4.7 related. If my means of testing were wrong or if someone else can confirm it in 5.x then please comment and change the version back to Drupal5.x.

#14

killes@www.drop.org - December 11, 2006 - 21:21
Priority:critical» normal

I've tried to repro this on 4.7-x running on php 5.1 and couldn't reproduce it. Downgrading.

#15

netbjarne - December 11, 2006 - 21:55

On my host, surftown, the problem still exists. Also in 5.0 beta 2 - see attached screenshot.

Needless to say, that if in the "request new password" text, replace !site (that contains national characters), with !uri (that only contains ascii), the problem goes away.. Same ol' I

Bjarne

AttachmentSize
mail-error-screenshot.JPG 73.52 KB

#16

greggles - December 11, 2006 - 22:01
Version:4.7.x-dev» 5.x-dev

So, I'd say this is a combination of national characters in the subject AND a certain configuration of PHP. I agree with Killes on priority, but move it back to 5.x since it affects that and should get attention there.

@netbjarne - the problem only affects the per user contact page, right? And since you are one of the few who can test this, would you be willing to try out a patch if one is provided?

#17

Steven - December 12, 2006 - 00:43

This is really a bug in PHP that should be addressed. Removing the linebreak means disobeying the RFC.

#18

scor - December 12, 2006 - 05:41

I had the same problem that I solved with the solution above. I think this issue concerns only a few PHP configurations and is not related to the version of drupal. I'd say it's directly related to the mail function of PHP, and maybe to the national settings. The problem does not only appear in the contact page, but as I stated previously

This problem occurs whenever the subject of the email sent by the server is longer than 46 characters and contains national characters.

I first notice this problem with subscriptions.module which was not sending the emails to the users who had a username containing national characters... Try as an example to create an account with a long user name containing national characters. The subject of the resulting email has to be longer than 46 characters. This will force the subject of the email to be encoded and several chuncks will be generated... and the bug should appear... at least on the buggy PHP configurations.
Greggles, have you tried that? Does the encoded email subject in the email header contain any line break ?
I can also try a patch if provided.
Steven, I agree that the RFC is disobeyed, but shouldn't it be PHP that should add these linebreaks instead, since the PHP documentation requires no linebreak in the email subject ?

#19

Steven - December 12, 2006 - 21:44

PHP should not be adding the linebreaks, unless PHP were to actually accept a random unicode string and do the encoding itself.

PHP requires us to do the encoding, and separating chunks on lines is an essential part of this.

#20

scor - December 13, 2006 - 10:26

This is what the php mail function says about the subject of the email :

subject

Subject of the email to be sent.

Caution

This must not contain any newline characters, or the mail
may not be sent properly.

and it doesn't mention anything about the linebreaks in the case of an encoded subject.
Is there an exception for the encoded subjects ?

Moreover, when I send a message through drupal.org, the encoded subject chunks are all on the same line:

Subject: =?UTF-8?B?W2RydXBhbC5vcmddIHTDqXN0IHBvdXIgdm9pciBzaSBsZXMgc3VqZXQgcGxhbnQ=?=  =?UTF-8?B?ZW50IGNoZXogZHJ1cGFsLm8=?=

#21

netbjarne - January 26, 2007 - 19:10

More info on this bug.

I wrote messages on the contact form. Some went through. Some didn't. I can confirm, that subject messages have to be of a certain lengt (46 has been mentioned, that looks about right) - AND that national characters must be present in the final subject of the email (for instance, if the sitename contains them).

Heres the subject of a message that passed through the user_mail function:
[Kegnæs Friskole] 0123456789012345678901234567

Add another "8" to the subject, and the mail fails.

I will try the hack of removing newline characters of in the subject, and return with additional info.

Bjarne

#22

netbjarne - January 26, 2007 - 19:23

I found me another workaround (gotta make a list of drupal workarounds, it gets hard to remember to re-apply them all every time a new version is installed ;-))

in include.inc, the mime_header_encode function, i replaced

    $chunk_size = 47; // floor((75 - strlen("=?UTF-8?B??=")) * 0.75);

with
    $chunk_size = 400; // floor((75 - strlen("=?UTF-8?B??=")) * 0.75);

Its an overly big chunk size, since the mail form does not allow lengthy subjects, however, utf-8 encoding seems to lengthen things a low...

Now - mail passes through just fine - no linebreaks in the subject (who came up with that idea anyway) - and no lost messages.

Bjarne

#23

netbjarne - January 26, 2007 - 19:25

Mistake in last post. The edited file was not include.inc, but unicode.inc. Sorry..

#24

yasenp - April 8, 2007 - 12:19

I had the similar problem, but "$chunk_size = 400;" solved it. Many thanks to netbjarne!

#25

ximo - June 9, 2007 - 10:02

What's the story on this bug? Has it been fixed in another issue, or is this bug still hanging around? This should be fixed for Drupal 6.

#26

ximo - June 9, 2007 - 10:30

I just got this error without having any national characters in the subject line. I was creating a new user from admin/user/user/create, and the subject of the email message to be sent out was En konto har blitt opprettet for deg på !site where !site = Wannabe. I tried some of the mentioned workarounds, but found simply removing the \n</codefrom the end of <code>$output .= ' =?UTF-8?B?'. base64_encode($chunk) ."?=\n"; did the trick. Why is the newline there in the first place? It's looks like it's the newline that breaks the mail() function.

I'm not sure why I got this error when I had no national characters in the subject line or the site name. This was on Drupal 5.1, PHP 4.4.6, Apache/1.3.37 (Unix).

#27

ximo - June 9, 2007 - 11:35

I'm obviously blind, I did have an å in the subject line!

I looked into the background of this issue, and found these links:
http://www.php-security.org/MOPB/MOPB-34-2007.html
http://bugs.php.net/bug.php?id=15841

Didn't make me any wiser though..

Then I saw this note in the mime_header_encode() function_

* - Using \n as the chunk separator may cause problems on some systems and may
*   have to be changed to \r\n or \r.

Changing \n to \r did the trick, Drupal could now send the mail with a subject containing å. I know this doesn't follow the RFC, but it works with the mail() function and I believe that's more important. Having to manually change this deep inside the core shouldn't be necessary, why can't the chunk separator be \r by default? See the attached patch.

AttachmentSize
unicode.inc-chunkseparator.patch 411 bytes

#28

earnie - November 2, 2007 - 11:25

Perhaps the following would take care of the issue? I don't have a good scenario to test with.

-      $output .= ' =?UTF-8?B?'. base64_encode($chunk) ."?=\n";
+      $output .= ' =?UTF-8?B?'. base64_encode($chunk) .utf8_encode("?=\n");

#29

siammoney.net - December 1, 2007 - 06:06
Title:warning: mail(): Bad parameters to mail() function, mail not sent. in /www/mysite.com/www/root/drupal47/modules/user.module on» warning: mail(): Bad parameters to mail() function, mail not sent
Version:5.x-dev» 5.2
Priority:normal» critical
Assigned to:Anonymous» siammoney.net

warning: mail(): Bad parameters to mail() function, mail not sent. in /home/content/p/u/r/purihostsiam/html/includes/common.inc on line 1979.

this message occurs when create a new account . somebody help me please!.

#30

scor - December 1, 2007 - 11:30

siammoney.net: are you using accented characters in your username when creating your account?

#31

siammoney.net - December 2, 2007 - 07:32
Component:user.module» aggregator.module

yes I have test create a new account for quest by use accented characters in username

#32

scor - December 2, 2007 - 11:54
Version:5.2» 5.x-dev
Component:aggregator.module» user.module

aggregator???
can you check that you don't have the problem with non accented chars.

@ximo: whether you use \r, anything else or nothing at all, it's the same as long as it's not \n (see #11)

#33

siammoney.net - December 3, 2007 - 02:33

thank you, but when I use a common chars such as puri007 that always show this errors.How 's about syntax in line 1976 on common.inc? I confuse in $mimeheaders and $subject.

#34

siammoney.net - December 3, 2007 - 08:17

thank you for suggestion,I try new install drupal 5.2 that good work.I think it 's cloud be errors about theme or module that after install. so happy

#35

scor - December 3, 2007 - 08:53

a simple username like puri007 should not give you any error. did you modify the code of the core? I suggest you install a fresh drupal-5.3 on the same server without any contributed module to see if you still get the error when creating an account with puri007.

#36

siammoney.net - December 4, 2007 - 02:43

thank you, I use to drupal-5.2 because it's no error after new install.Now,I have suspect to log in of drupal members why accept a cookies because another's website had not to opened the cookie.

#37

drumm - December 5, 2007 - 19:30
Version:5.x-dev» 5.2
Status:active» postponed (maintainer needs more info)

Please reopen when this has been tested with a current version of 5.x. 5.2 is now an older release.

#38

liquid crystal - March 30, 2008 - 18:38

I'm having the same issue with D6.1. my site phsite.org/main is using an Arabic name in it's site name, I tried to change !site by explicitly defining it but that didn't help :(
I used to overcome this with the smtp.module, but it is not ported to 6.x yet, not sure if it even will be ported!

Server PHP version is 4.4.6

#39

scor - March 30, 2008 - 18:58
Version:5.2» 6.x-dev
Priority:critical» normal
Assigned to:siammoney.net» Anonymous

#40

liquid crystal - April 5, 2008 - 08:14

I'm still having the same issue, does any one know of a solution?

#41

scor - April 5, 2008 - 16:02

@liquid crystal: can you try the fix I described in #11 http://drupal.org/node/84883#comment-449438
it's not ideal, but it might help you. please report whether it works for you or not.
also, how many characters does the subject of the email contain?

#42

liquid crystal - April 8, 2008 - 10:01

Hi scor,

It seems Drupal 6 is a lot different than Drupal 5 in terms of the unicode.inc. I'm not a programmer by any mean but at least that how it looks to my eyes:

279 function mime_header_encode($string) {
280 if (preg_match('/[^\x20-\x7E]/', $string)) {
281 $chunk_size = 47; // floor((75 - strlen("=?UTF-8?B??=")) * 0.75);
282 $len = strlen($string);
283 $output = '';
284 while ($len > 0) {
285 $chunk = drupal_truncate_bytes($string, $chunk_size);
286 $output .= ' =?UTF-8?B?'. base64_encode($chunk) ."?=\n"; <--- should I remove this \n?
287 $c = strlen($chunk);
288 $string = substr($string, $c);
289 $len -= $c;
290 }
291 return trim($output);
292 }
293 return $string;
294 }

The subject is 69 characters long, do you think I should try and make it less than 64?

#43

liquid crystal - April 8, 2008 - 12:54

Hi scor,

Removing the \n from that line solved the problem, thanks a zillion time :D

#44

Pr0v0dn1k - June 28, 2008 - 10:57

I've solved the problem on v6.2, PHP 4.4.7 in the following way:

in file 'includes/mail.inc', in line 186 replaced

mime_header_encode($message['subject']),
with
str_replace("\n", ' ', mime_header_encode($message['subject']) ),

It just replaces LF with SPACE in the subject after it is received from the mime_header_encode.

#45

jcnventura - August 5, 2008 - 11:26
Component:user.module» base system
Status:postponed (maintainer needs more info)» needs work

This problem is encountered by all modules that send e-mail, including the contact module.

In the print module, a user was unable to send a message with the subject:
"admin has sent you a message from Urduseek.com انگریزی اردو لغت"

He later tried the same in the contact module, and it also failed. However, I have tried it in my system and it works fine.. He tried it in another system and was it was also fine.. The original print module issue is : #290517: bad parameters in mail() function.

João

#46

yuREKLI - September 9, 2008 - 13:40

I encountered this error in a site which is hosted by Godaddy. I have solved this error by using SMTP Module: http://drupal.org/project/smtp.

#47

earnie - September 9, 2008 - 14:35
Version:6.x-dev» 7.x-dev
Status:needs work» active

There is no patch so setting back to active. Also bumping to 7.x since the problem still exists. Should we consider that Drupal core should use the logic from smtp module?

#48

jcnventura - September 9, 2008 - 22:46
Status:active» needs work

There is a patch (in #44). It's not a machine-readable patch to use with the patch program, but it is a patch anyway.

João

#49

greggles - September 9, 2008 - 23:10
Status:needs work» needs review

Which makes it not a patch. We only set the status to patch (code needs review) when there is a machine readable patch.

This patch was rolled against 6.x but also applies to 7.x.

AttachmentSize
84883_subject_newline.patch 1017 bytes
Testbed results
84883_subject_newline.patchfailedFailed: 7199 passes, 4 fails, 0 exceptions Detailed results

#50

scor - September 10, 2008 - 06:09

note that this breaks the RFC2047, but seems to be the only way to fix the problem, unless it is fixed on a PHP level (as suggested by Steven).
patch documented.

AttachmentSize
84883_subject_newline_2.patch 848 bytes
Testbed results
84883_subject_newline_2.patchre-testing

#51

earnie - September 10, 2008 - 13:00

The patch looks pretty. I don't have a means to test it though.

#52

Anonymous (not verified) - November 12, 2008 - 00:40
Status:needs review» needs work

The last submitted patch failed testing.

#53

manoloka - January 18, 2009 - 11:29

This worked for me :-)

Thanks

#54

earnie - January 19, 2009 - 16:03
Status:needs work» needs review

Resetting for the testbot one more time.

#55

earnie - January 22, 2009 - 17:35
Status:needs review» reviewed & tested by the community

#56

Dries - January 23, 2009 - 14:27
Status:reviewed & tested by the community» needs work

Instead of writing 'see #84883', please reference the correct article in the RFC. Thanks.

#57

KiamLaLuno - January 23, 2009 - 14:43
Title:warning: mail(): Bad parameters to mail() function, mail not sent» Bad parameters to mail()

#58

scor - January 23, 2009 - 15:01

so far this issue has not been reproduced on PHP 5 so it might NOT be necessary to commit it to HEAD (and just to 6.x and 5.x). I'll try to reproduce on PHP 5.
EDIT: missed the NOT

#59

KiamLaLuno - January 23, 2009 - 15:25

I tried to send an email from Drupal 6 installed in a local web site using PHP5, but I didn't have any problems. I changed the user name to Espero ååå, and then I sent a message using the contact form; Drupal didn't return any error messages.

I must then say that the local web site is running on a Mac using Mac OS X 10.5.6.

#60

scor - January 23, 2009 - 15:42
Status:needs work» needs review

rerolling patch against HEAD with link to this issue. I wasn't able to reproduce the issue on PHP 5, therefore I'm not convinced this needs to go into HEAD.
Would this issue deserve a test?

AttachmentSize
84883_subject_newline_d7_1.patch 865 bytes
Testbed results
84883_subject_newline_d7_1.patchfailedFailed: 9679 passes, 1 fail, 0 exceptions Detailed results

#61

scor - January 23, 2009 - 15:46

@Kiam@avpnet.org: the subject of your email must be at least 46 character long to reproduce the error. Try with the following subject:

Le sujet de ce message est très très très long!

#62

KiamLaLuno - January 23, 2009 - 16:20

I tried it, and it didn't receive any error message.
I also tried it on Drupal 6.9 on my web site, running on Apache/1.3.41 (Unix) with PHP 5.2.6; the result didn't change.

It seems that the problem is not present with PHP5.

#63

liquid crystal - January 24, 2009 - 11:45

I still have the same problem on Drupal 6.9 PHP 5.2.6 when I send mail through the printmail functionality of Printer-friendly pages module.
Please try it here:
http://yousef.raffah.com/printmail/node

#64

liquid crystal - January 27, 2009 - 08:52

Anybody else is still affected by this problem except me? :(

#65

jcnventura - January 27, 2009 - 10:33
Status:needs review» fixed

Hi,

I have just used Drupal 5.15 to send a mail with subject "Le sujet de ce message est très très très long!Le sujet de ce message est très très très long!Le sujet de ce message est très très très long!" (3x the subject in #61) and it made it across OK..

I was using the print_mail module to send the message. I do notice that the contents of the message arrive as:

Subject: =?UTF-8?B?TGUgc3VqZXQgZGUgY2UgbWVzc2FnZSBlc3QgdHLDqHMgdHLDqHMgdHLDqHMgbG8=?=  =?UTF-8?B?bmchTGUgc3VqZXQgZGUgY2UgbWVzc2FnZSBlc3QgdHLDqHMgdHLDqHMgdHLDqHM=?=  =?UTF-8?B?IGxvbmchTGUgc3VqZXQgZGUgY2UgbWVzc2FnZSBlc3QgdHLDqHMgdHI=?=
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Errors-To: me@example.com
Sender: me@example.com
Reply-To: =?UTF-8?B?Ikpvw6NvIENhcmxvcyA1ZWdyw6NvIFZlbnR1cmEgYSB2ZXIgc2UgaXN0byBkw6E=?=@example.com,
  =?UTF-8?B?IHByb2JsZW1hcyIgPGpjbnZABB12LmVzPg==?=@example.com
From: =?UTF-8?B?Ikpvw6NvIENhcmxvcyA1ZWdyw6NvIFZlbnR1cmEgYSB2ZXIgc2UgaXN0byBkw6E=?=@example.com,
  =?UTF-8?B?IHByb2JsZW1hcyIgPGpjbnZABB12LmVzPg==?=@example.com

Anyway, if this seems to with both Drupal 5.15 and Drupal 6.9 (both on PHP5), and it didn't work with another Drupal 6.9 in PHP5, it must be something outside of Drupal.. I am moving this to fixed status, unless liquid crystal can pinpoint the problem.

@liquid crystal: does applying this patch solve the problem for you??

João

#66

scor - January 27, 2009 - 14:20
Status:fixed» needs review

this is not fixed yet!

#67

liquid crystal - January 27, 2009 - 19:32

I just tried the patch in #60 and didn't get the error message I used to get earlier, however, I will still investigate further and report back if I stumbled upon any issue.
Thanks for the tip jcnventura

#68

kenorb - February 4, 2009 - 19:52

#69

System Message - February 5, 2009 - 07:05
Status:needs review» needs work

The last submitted patch failed testing.

#70

mdupont - February 13, 2009 - 15:15

Any confirmation of #68?

#71

hayworth - February 16, 2009 - 14:36
Version:7.x-dev» 6.9

Languaje: Spanish, with letters like ñ á é í ó ú.

Drupal 6.9

PHP Version 5.2.6

The problem begins when I installed the es.po for Spanish. I think (?) before it works properly.

Now, even if I come back to English languaje the problems is there.

#72

hayworth - March 13, 2009 - 19:21

I can confirm: this issue happens to me when I installed the Spanish translation for drupal (es.po). Before it works properly.

I have solved this error by using SMTP Module: http://drupal.org/project/smtp.

See #46.

#73

Bairnsfather - April 3, 2009 - 05:07
Version:6.9» 6.10

I'm on Drupal 6.10 using php 5.2.8 and the problem(s) described above apply to me too. (In case it matters, I also have this on the Status page: Unicode library PHP Mbstring Extension.)

Here is the issue. When the title of a node (book page) has "curly quotes" aka "smart quotes" in it, there is an error after submitting a comment to the page:

Unable to send e-mail. Please contact the site admin, if the problem persists.

Appears at the top of the page upon comment submission.

In the Recent Log entries (/admin/reports/dblog) there are two errors:

  • php error: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /html/includes/mail.inc on line 193.
  • mail error: Error sending e-mail (from Admin @ domain.org to Admin @ domain.org).

If I go in to the book page, and edit the title and put plain quotes in place of the curly quotes, the email is sent without an error.

Best I can tell, my specific issue is in /includes/mail.inc on line 186. But I don't know enough to know how to address the issue, except for the workaround of not using fancy quotes.

#74

scor - April 6, 2009 - 23:38

@hayworth and @Bairnsfather could you try with the patch at #60 and see if you still have the same problem?

#75

josepvalls - May 28, 2009 - 19:34
Version:6.10» 6.12
Component:base system» language system

Same issue.
I've been looking at some transliteration implementation to replace those characters with either plain english or the html entities (preferred).
I'm new to drupal and not a php expert so any help would be appreciated.

#76

magnjorg - May 31, 2009 - 11:21

I too had this issue. Patch in #60 did not work. Workaround in #22 works.

Using drupal 6.12, php 5.2.6.

#77

scor - June 7, 2009 - 15:40

rerolling

AttachmentSize
84883_subject_newline_d7_2.patch 860 bytes

#78

lebloch - June 10, 2009 - 11:40

I had the same problem. In my case it was solved by solution sugested in comment #22. (drupal 6.11 , php 5.2.5)

#79

czoper - June 19, 2009 - 02:26

#22 + #23 works just fine and solves the problem

THANKS netbjarne!!!

 
 

Drupal is a registered trademark of Dries Buytaert.