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!.

Edited by WorldFallz - moved to appropriate forum.

Comments

scrypter’s picture

Are you on localhost or hosted? What is the php version? Could be related to mimeheaders? Could be SMTP if you enabled it. Did you alter the email content for new registrations?

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy

EyalSch’s picture

hosted, drupal 5.3-hebrew, PHP 4.4.6.
the "contact form" is working.

photoboy’s picture

Removing email variables like !site and !user from the subject helped me get these types of emails working.

bostonclimber’s picture

Thanks. This worked. The variables can be used in the message body so it is good enough.
Hosting at GoDaddy.com.

vpapadim’s picture

From your path, it looks like you have a godaddy hosting. I have the same problem and the suggestions above did not help. Is that a DoDADDY specific issue

Vickk’s picture

Hi, I have a same problem

* warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/i/z/v/izvorchemm/html/includes/mail.inc on line 193.
* Unable to send e-mail. Please contact the site admin, if the problem persists.

and my drupal is hosted on godaddy, do you find any solution for fixing the problem?

breaklogic’s picture

looks like it's a bug related to character code You are using.
As soon as i have removed non-english characters from the mail massege admin sends on creating an acocount, like čćšđž, it worked.

Hope that helps.
and i'm sad that i can't use my language characters in mails.

Filip.

hotels.net’s picture

i don't know if it can be related, but lot of people seems to have problems with godaddy mail

GoDaddy.com is notorious for blocking entire subnet ranges from other ISP's. Their stance seems to be "hey, its out of our hands since it's an automated process". I take it that their servers get a msg, mark it as spam, and then blacklist the entire subnet or whatever they find in ARIN from a WHOIS.

http://www.ozzu.com/hosting-forum/godaddy-email-problems-anyone-else-t56...
http://www.google.fr/search?hl=fr&safe=off&q=godaddy+mail+problem&btnG=R...

sorry if i m wrong

josee225’s picture

The test site was originally hoset on iWeb, which worked fine. No that the site is transfered on its proper server (cartika) it won't work anymore, even if I take out the french accents.

Does anyone have a solution to this ?

Thanks for the help !
-Josée

krizak’s picture

When I had removed all non-english characters from email AND removed any variables from the subject, problem seems to be solved.

briskday’s picture

I have several drupal 6 installs on godaddy hosting accounts and the email function works fine. I did run into this error when one of my sites name included an é, after removing the special character from the email subject lines, the error was gone and emails were sent. Thanks for posting the fix.

gunwitch’s picture

I'm getting the same problem:

warning: mail(): Bad parameters to mail() function, mail not sent. in /hsphere/local/home/{my-username}/{my-website}/includes/mail.inc on line 193.

Drupal version: 6.6
PHP: 5.2.5

I'm on the *nix shared hosting, and it's NOT don'tGoDaddy.

P.S.
Is it possible to keep non-English characters in the welcome e-mails? My project is for non-English speaking audience, so usage of local language is much more preferable.

• • • • • • •
¤ Ebay Blog - Profitable eBay Niches to Make Money Selling Online
¤ IP Address | ¤ Business Ideas | ¤ Halo 3

andersiversen’s picture

excact same problem here - did you find a solution?
My audience is also non-english with special characters

- I've got a new pal - Drupal. We play all the time.

markconroy’s picture

warning: mail(): Bad parameters to mail() function, mail not sent. in /hsphere/local/home/markconroy/example.com/includes/mail.inc on line 193.

Running Drupal 6.8
Shared hosting on Register365.ie

This is only happening for 2 categories of my contact form, the rest seem to be fine.
Messages are being sent in English without special characters.

Mark Conroy
www.mark.ie

============

Drupal Core Maintainer for "Out of the Box" Initiative.

kenorb’s picture

The same problem
Hosting: home.pl

manoloka’s picture

I had the same problem "on line 193"

Removing the variables !site and !username from the email subject solves the problem and the email is sent, however I think this is only a provisional fix as having variables in the subject is very useful and would like to be able to use them.

Anyone knows the way to make it work or a post with the answer?

Thanks

markconroy’s picture

I've just realised that the two offending categories had non-English characters: i.e. á and é.

I've changed these to two normal letters, much to my dismay, and the form works fine now.

Mark.
www.markconroy.net/blog

============

Drupal Core Maintainer for "Out of the Box" Initiative.

scor’s picture

A fix for this issue is currently under review. Please read #84883: Unicode::mimeHeaderEncode() doesn't correctly follow RFC 2047, try the fix, and report your experiences. Thanks.

darmstrong’s picture

my site is also hosted on GoDaddy! and the suggestion of removing the !username !sitename parameters from the subject header and in the body in the auto generated e-mails under user settings worked for me. THANK YOU, this thread was very helpful.

However, this should be noted...
While the user is able to create and account (I have the e-mail verification turned OFF so they can create a password during registration) and was logged in successfully after creating an account...

The auto e-mail after a half hour of waiting still has not been delivered to my test e-mail account. So it seems the e-mails do not go through, but at least the user does not get an error message during registration. So this will work for those of you who do not require account verification, but if you do require that then you still may have an issue.

Rafael Cansinos’s picture

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.

Rafael Cansinos
Fundación Archivo Rafael Cansinos Assens

josepvalls’s picture

http://drupal.org/node/84883

I've been told to blame Godaddy but it seems to happen with other hosting providers.

vpapadim’s picture

in includes/common.inc ~line 2100 (drupal 5x)

limit the subject to 40 characters ( which solves the issue ) and added the full subject on the email body...

    // fix subject on email to be trimmed before mime_header_encode will add new line chars
    //mime_header_encode($subject),
    //str_replace("\r", '', $body),
    return mail(
      $to,
      mime_header_encode(substr($subject,0,40) ),
      str_replace("\r", '', 'Subject: '.$subject.': '.$body),
      join("\n", $mimeheaders)
    );

omar alahmed’s picture

I faced the same problem when i used non English language. and it was from the webform node title (Its was long and after encoding it by hte mail function it becomes very long). The solution is by making the form title small as much as possible and it'll work.

eranglr’s picture

I tried the substr function on mail.inc, email been sent but got error message:
warning: Wrong parameter count for substr() in ....

Any ideas?

yanchen’s picture

I am running Drupal 6. Don't know if I can use the patch and if yes how do I patch it since I have with godaddy and no SSH access.

For me if the entire email is English there is no problem. But I need to sent Chinese news letter. This problem affects all email related modules.

Goncalo Ribeiro’s picture

Hi,

This workaround worked for me in file /includes/mail.inc:

I replaced this line

mime_header_encode($message['subject']),

with this one

$message['subject'] = "=?UTF-8?B?" . base64_encode($message['subject']) . "?=",

-------------------------------------------------------

I did this because i realise the subject has special characters, i inserted a "echo $message['subject'];" and i saw the output.

chucklima’s picture

aqmaster’s picture

http://drupal.org/files/issues/84883_subject_newline_d7_2.patch también me sirvió.

I´m hosted in godaddy, and it´s worked!