Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
send to friend feature is not working on shared hosting. They have PHP5 as cgi. Following is the error:
* warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/h/o/s/****/html/u/includes/mail.inc on line 193.
* Unable to send e-mail. Please contact the site admin, if the problem persists.
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedMaybe you're not allowed to send e-mail?
Comment #2
Asif99 CreditAttribution: Asif99 commentedSite contact form and user registration emails are working fine!
Comment #3
jcnventura CreditAttribution: jcnventura commentedThere are very few differences between the code for the site contact form and the mail code in this module...
I need to know more how I can reproduce this.. Does it happen always, or only when sending to several addresses?
João
Comment #4
Asif99 CreditAttribution: Asif99 commentedIts happening always. With single or more address!
here is phpinfo() link:
http://u.urduseek.com/content/php-info
Comment #5
Asif99 CreditAttribution: Asif99 commentedI just found that the problem is caused by email's subject string:
admin has sent you a message from Urduseek.com انگریزی اردو لغت
If I remove Urdu or shortens the subject by removing few English letters then it goes smoothly.
I am not sure if the problem lies with drupal mail handler or send to friend module!
Thanks,
Asif Hisam
Comment #6
jcnventura CreditAttribution: jcnventura commentedI have successfully sent an email with the subject that you provided.
I have also managed to send an e-mail with subject: "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx"
João
Comment #7
jcnventura CreditAttribution: jcnventura commentedHi,
Are you able to send an email with the subject in #5 from the site contact form?
João
Comment #8
Asif99 CreditAttribution: Asif99 commentedJust tried the contact form with this subject and it also failed!
So problem is with core module.
Interestingly its working on my local machine which is windows/apache2.1/php5.26.
Thanks,
Asif Hisam
Comment #9
jcnventura CreditAttribution: jcnventura commentedI am closing the issue, as it is now been found to be a problem in Drupal.
The problem is actually known, so this is actually a duplicate of #84883: Unicode::mimeHeaderEncode() doesn't correctly follow RFC 2047.
João
Comment #10
Asif99 CreditAttribution: Asif99 commentedYes the problem is in the drupal unicode.inc. I found the following patch which fixed this problem: