Download & Extend

Mail not sent with special characters in subject

Project:Mime Mail
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I am getting a similar issue as others but at a different line location:

warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/b/o/i/boisegunclub/html/drupal6/sites/all/modules/mimemail/mimemail.module on line 231

My newsletter issue title is fairly short: 2009 Spring 5 Stand League
product versions:
Simplenews 6.x-1.0-rc6
Mime Mail 6.x-1.x-dev (2009-Apr-14)
Drupal 6.8

Comments

#1

Watchdog log shows the following:
Outgoing email failed. Message type: test
Subject: [Boise Gun Club newsletter] 2009 Spring 5 Stand League
Recipient: administrator@boisegunclub.com Sent via Mime Mail

#2

It's probably related to the fact that php's mail function does not play well with the way mimemail presents the recipient. Try replacing the lines:
return addslashes(mime_header_encode($address['name'])) .' <'. $address['mail'] .'>';
in mimemail.inc with
return '<'. $address['mail'] .'>';

Fixed my problem.

#3

I'm also getting simiar error message.

mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/.../drupal6/sites/all/modules/mimemail-6.x-1.x-dev/mimemail/mimemail.module on line 231.

Drupal 6.12
Mime Mail 6.x-1.x-dev
Simplenews 6.x-1.0-rc6

#4

Having the same problem.

#5

any other fix ideas? #2 didn't work for me

#6

#2 seems to have fixed my problem as well, although I've thought it fixed twice now only to have it break again after a few days. I'll keep my fingers crossed.

Drupal 6.14
Simplenews 6.x-1.0-rc6
MimeMail 6.x-1.x-dev

#7

Version:6.x-1.x-dev» 6.x-1.0-alpha1

I am using Simple news 6.x-1.0 and Mimemail 6.x-1.0-alpha1 and when I send a newsletter I get the error:

mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/a/i/r/airfield/html/sites/all/modules/mimemail/mimemail.module on line 239.

The subject of the newsletter was

The Airfield Flyer - January 2010 is now online

I then started shortened one letter at a time and it failed every time until I got to:

The Airfield Flyer Jan 2010 is now online

and then it sent without any problems.

#8

Version:6.x-1.0-alpha1» 6.x-1.x-dev

Didn't mean to change the whole version.

#9

I am having the same problem on Drupal 6.16. here is the error message:
warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/41/6124541/html/includes/mail.inc on line 193.
Unable to send e-mail. Please contact the site administrator if the problem persists.

I amnot technically capable, so please provide detailed step by step information on how to fix this problem.

#10

I had the same problem and remove the # (hash/pound sign) from the title - perhaps someplace the title is being escaping it and mimemail doesn't like it?

#11

I'm having the same problem.

#12

Download SMTP module and install it ! hope it works

#13

I had the same proble, actually I was getting that error because the subject contained special characters like ñ or tilde.

#14

Had the same problem line 239 error etc.

Was due to using a hyphen in the title.

Removed and works.

#15

Title:warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent» Mail not sent with special characters in subject

Changing title to a more descriptive one.

#16

Status:active» closed (fixed)

I was unable to reproduce this with the latest development snapshot. I assume this is fixed now.

#17

I had the same problem with the subject of the email being of mixed character set (english and greek).

The fix I found was to switch the chunk separator in html/includes/unicode.inc function mime_header_encode() line 380:
The default was "?=\n", I changed it "?=\r" since I am in a Linux host (GoDaddy).

There's a note in that function's comments suggesting that you should try "?=\r\n", too.

Hope that helps.