every time i try and subscribe using the form in the Block i get an error, basically it can't send the confirmation email...
if i am logged in and then press the "subscribe" button all works fine... I am guessing this is because it doesn't try and send a confirmation email?
i have tried the newest version of module, the dev version that came out a few days ago, the approved version... they all have the same problem...
i haven't found anyone with the same problem though...
any advice?
in red box:
warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/n/e/d/nedich/html/obama/includes/mail.inc on line 193.
Unable to send e-mail. Please contact the site admin, if the problem persists.
in green boc:
You will receive a confirmation email shortly containing further instructions on how to complete your subscription.
note: even though last message says i will receive email etc i never get one...
| Comment | File | Size | Author |
|---|---|---|---|
| Picture 71.png | 18.05 KB | marlowx |
Comments
Comment #1
sutharsan commentedturn on the mail logging in the sn settings. Report the email content you find in the log.
Comment #2
marlowx commentedi got several errors in the log... as i have no idea what they are i'll just list them all here in the order they appeared:
Type php
Date Monday, November 10, 2008 - 01:18
User Comrade
Location http://americasfavoriteterrorist.com/
Referrer http://americasfavoriteterrorist.com/?q=admin/build/block
Message mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /home/censored/includes/database.mysqli.inc on line 323.
Severity error
=========================
note: this isn't an error but it was the next entry in log:
simplenews
Date Monday, November 10, 2008 - 01:18
User Comrade
Location http://americasfavoriteterrorist.com/
Referrer http://americasfavoriteterrorist.com/
Message Outgoing email. Message type: subscribe
Subject: Confirmation for News from America's Favorite Terrorist!™
Recipient: my@email.com
Severity debug
==========================
php
Date Monday, November 10, 2008 - 01:18
User Comrade
Location http://americasfavoriteterrorist.com/
Referrer http://americasfavoriteterrorist.com/
Message mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/blahblahblah/html/obama/includes/mail.inc on line 193.
Severity error
==========================
Type mail
Date Monday, November 10, 2008 - 01:18
User Comrade
Location http://americasfavoriteterrorist.com/
Referrer http://americasfavoriteterrorist.com/
Message Error sending e-mail (from deleted email address so no spam.com to me@email.com).
Severity error
=============================
Type php
Date Monday, November 10, 2008 - 01:18
User Comrade
Location http://americasfavoriteterrorist.com/?q=node
Referrer http://americasfavoriteterrorist.com/
Message mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /home/content/blahblahblah/html/obama/includes/database.mysqli.inc on line 323.
Severity error
==============================
Type php
Date Monday, November 10, 2008 - 01:18
User Comrade
Location http://americasfavoriteterrorist.com/
Referrer http://americasfavoriteterrorist.com/?q=node
Message mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /home/blahblahblah/html/obama/includes/database.mysqli.inc on line 323.
Severity error
Comment #3
sutharsan commentedYou first need to solve the oldest of the above errors, this is fundamental. The simplenews error may well be a result of this.
Comment #4
sutharsan commentedNo response, closing the issue.
Comment #5
pawel.traczynski commentedFound out solution:
You need to modify 'mail.inc' file contained in '/includes' directory of the Drupal installation.
Change the line 186 from:
mime_header_encode($message['subject']),
To:
str_replace("\n", '',mime_header_encode($message['subject'])),
I know it's hard coding in the core files but it works.
Now you can include parameters in the email title - like '!site' - and message will be send :-)
CYa!
Comment #6
kenorb commentedPatches hacking the core related to functionality of some contributed module are not good solutions, especially marking them as fixed:)
http://drupal.org/patch/review
Comment #7
kenorb commentedThe error means that mail() function received the wrong arguments from simplenews.
You have to check what parameters has been send to mail() function (php.net/mail).
Look for the line:
And paste it before that line:
And check your logs, what has been passed to your drupal_mail.
And compare with requirements: http://api.drupal.org/api/function/drupal_mail
I didn't test that code, so look after some syntax mistakes, just for general idea to know what you looking for.
Comment #8
avpadernoThere is already an issue report opened for Drupal. It seems the problem is
mail().See #84883: Unicode::mimeHeaderEncode() doesn't correctly follow RFC 2047 for more informations.
Comment #9
avpadernoI am changing the category as this is not a bug of the module which simply uses a Drupal function.
The problem, if that can be fixed, must be fixed in Drupal core code.
Comment #10
avpadernoComment #11
kenorb commented#84883: Unicode::mimeHeaderEncode() doesn't correctly follow RFC 2047