, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > Sending Newsletter Error

FlexCMS Support Forum


Sending Newsletter Error
Started November 3, 2009 @ 11:30am by andrewm
Post Message 
Pages:  [1]  2  

andrewm


Posts: 10
 
Sending Newsletter ErrorNovember 3, 2009 @ 11:30am
Newsletters are not sending and I'm getting this error:

Warning: mail(): Bad parameters to mail() function, mail not sent. in /home/content/t/h/e/thecyberhost/html/rotary/inc-nl-admin-newsletter_sendfinal.php on line 105
 
DCSun
Administrator



Posts: 625
 
November 3, 2009 @ 12:39pm
Hi Andrew,

That's usually due to how you or your host has the server set up. Some like to prevent PHP from setting the return address.

If you can't get it changed to allow that to be used, look at the file and line indicated in the error and you'll see this:
Code

if (mail($row4['Email'], $StrippedTitle, "", $MessageHeaders, '-f'.$Settings['ContactEmail'])) {
Remove the last parameter and end up with this:
Code

if (mail($row4['Email'], $StrippedTitle, "", $MessageHeaders)) {
Give that a try and see if that solves it for you. There are other areas of FlexCMS that send mail out which may also need to be updated depending on the site features you're using.


David


FlexCMS v3.2 Has Been Released!
 
andrewm


Posts: 10
 
November 4, 2009 @ 9:46am
tried this and still same error. Is there anything I can add to the php.ini? fyi i'm using php4.3.11
 
DCSun
Administrator



Posts: 625
 
November 4, 2009 @ 10:40am
Andrew,

Lets see what's going on with those variables. Right above that line add this:
Code

print '<br><br>Address:'.$row4['Email'].'<br>Title:'.$StrippedTitle.'<br>Message:'.$MessageHeaders.'<br><br>';


You may get a bunch of them depending on how many subscribers are in the list. Paste back the output of that and we'll go from there.


David


FlexCMS v3.2 Has Been Released!
 
andrewm


Posts: 10
 
November 4, 2009 @ 2:04pm


Address:andrew.mcghee@loganinsurance.com
Title:testing output
Message:From: "Logan Ohio Rotary Club" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="FlexCMS4af1b8251111c" This message was sent in HTML format, and your email client appears to be unable to display HTML emails. To view this message, please visit the archived version on our website: http://www.loganohiorotary.org/index.php/newsletter/messages.html Logan Ohio Rotary Club http://www.loganohiorotary.org You have received the Logan Ohio Rotary Club newsletter because you are a member at our website or have requested your name be added to our subscription list. If you wish to be removed from this mailing list, please click (or cut/paste into your web browser) this link: http://www.loganohiorotary.org/index.php/newsletter/unsubscribe_confirm/andrew.mcghee@loganinsurance.com/Z0OI69GDPBIW621VS6UL --FlexCMS4af1b8251111c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: base64 VGhpcyBtZXNzYWdlIHdhcyBzZW50IGluIEhUTUwgZm9ybWF0LCBhbmQgeW91ciBlbWFpbCBjbGll bnQgYXBwZWFycyB0byBiZSB1bmFibGUgdG8gZGlzcGxheSBIVE1MIGVtYWlscy4gIFRvIHZpZXcg dGhpcyBtZXNzYWdlLCBwbGVhc2UgdmlzaXQgdGhlIGFyY2hpdmVkIHZlcnNpb24gb24gb3VyIHdl YnNpdGU6IGh0dHA6Ly93d3cubG9nYW5vaGlvcm90YXJ5Lm9yZy9pbmRleC5waHAvbmV3c2xldHRl ci9tZXNzYWdlcy5odG1sCgoKCkxvZ2FuIE9oaW8gUm90YXJ5IENsdWIKaHR0cDovL3d3dy5sb2dh bm9oaW9yb3Rhcnkub3JnCgoKWW91IGhhdmUgcmVjZWl2ZWQgdGhlIExvZ2FuIE9oaW8gUm90YXJ5 IENsdWIgbmV3c2xldHRlciBiZWNhdXNlIHlvdSBhcmUgYSBtZW1iZXIgYXQgb3VyIHdlYnNpdGUg b3IgaGF2ZSByZXF1ZXN0ZWQgeW91ciBuYW1lIGJlIGFkZGVkIHRvIG91ciBzdWJzY3JpcHRpb24g bGlzdC4gSWYgeW91IHdpc2ggdG8gYmUgcmVtb3ZlZCBmcm9tIHRoaXMgbWFpbGluZyBsaXN0LCBw bGVhc2UgY2xpY2sgKG9yIGN1dC9wYXN0ZSBpbnRvIHlvdXIgd2ViIGJyb3dzZXIpIHRoaXMgbGlu azoKaH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JVzYyMVZTNlVM IiB0YXJnZXQ9Il9ibGFuayI+aHR0cDovL3d3dy5sb2dhbm9oaW9yb3Rhcnkub3JnL2luZGV4LnBo cC9uZXdzbGV0dGVyL3Vuc3Vic2NyaWJlX2NvbmZpcm0vYW5kcmV3Lm1jZ2hlZUBsb2dhbmluc3Vy YW5jZS5jb20vWjBPSTY5R0RQQklXNjIxVlM2VUw8L2E+PGJyPjxicj48L2ZvbnQ+PC9mb250Pg==


Warning: mail(): Bad parameters to mail() function, mail not sent. in /home/content/t/h/e/thecyberhost/html/rotary/inc-nl-admin-newsletter_sendfinal.php on line 105


Address:valeryjunge@hotmail.com
Title:testing output
Message:From: "Logan Ohio Rotary Club" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="FlexCMS4af1b82515f61" This message was sent in HTML format, and your email client appears to be unable to display HTML emails. To view this message, please visit the archived version on our website: http://www.loganohiorotary.org/index.php/newsletter/messages.html Logan Ohio Rotary Club http://www.loganohiorotary.org You have received the Logan Ohio Rotary Club newsletter because you are a member at our website or have requested your name be added to our subscription list. If you wish to be removed from this mailing list, please click (or cut/paste into your web browser) this link: http://www.loganohiorotary.org/index.php/newsletter/unsubscribe_confirm/valeryjunge@hotmail.com/HK8H2QUUIXVXHL4SQEZH --FlexCMS4af1b82515f61 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: base64 VGhpcyBtZXNzYWdlIHdhcyBzZW50IGluIEhUTUwgZm9ybWF0LCBhbmQgeW91ciBlbWFpbCBjbGll bnQgYXBwZWFycyB0byBiZSB1bmFibGUgdG8gZGlzcGxheSBIVE1MIGVtYWlscy4gIFRvIHZpZXcg dGhpcyBtZXNzYWdlLCBwbGVhc2UgdmlzaXQgdGhlIGFyY2hpdmVkIHZlcnNpb24gb24gb3VyIHdl YnNpdGU6IGh0dHA6Ly93d3cubG9nYW5vaGlvcm90YXJ5Lm9yZy9pbmRleC5waHAvbmV3c2xldHRl ci9tZXNzYWdlcy5odG1sCgoKCkxvZ2F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EgbWVtYmVyIGF0IG91ciB3ZWJzaXRlIG9yIGhhdmUgcmVxdWVzdGVkIHlvdXIgbmFt ZSBiZSBhZGRlZCB0byBvdXIgc3Vic2NyaXB0aW9uIGxpc3QuIElmIHlvdSB3aXNoIHRvIGJlIHJl bW92ZWQgZnJvbSB0aGlzIG1haWxpbmcgbGlzdCwgcGxlYXNlIGNsaWNrIChvciBjdXQvcGFzdGUg aW50byB5b3VyIHdlYiBicm93c2VyKSB0aGlzIGxpbms6PGJyPjxhIGhyZWY9Imh0dHA6Ly93d3cu bG9nYW5vaGlvcm90YXJ5Lm9yZy9pbmRleC5waHAvbmV3c2xldHRlci91bnN1YnNjcmliZV9jb25m aXJtL3ZhbGVyeWp1bmdlQGhvdG1haWwuY29tL0hLOEgyUVVVSVhWWEhMNFNRRVpIIiB0YXJnZXQ9 Il9ibGFuayI+aHR0cDovL3d3dy5sb2dhbm9oaW9yb3Rhcnkub3JnL2luZGV4LnBocC9uZXdzbGV0 dGVyL3Vuc3Vic2NyaWJlX2NvbmZpcm0vdmFsZXJ5anVuZ2VAaG90bWFpbC5jb20vSEs4SDJRVVVJ WFZYSEw0U1FFWkg8L2E+PGJyPjxicj48L2ZvbnQ+PC9mb250Pg==


Warning: mail(): Bad parameters to mail() function, mail not sent. in /home/content/t/h/e/thecyberhost/html/rotary/inc-nl-admin-newsletter_sendfinal.php on line 105






Sent: 0

Remaining: 2

0% Complete


Click here if the numbers above to not change for more than a minute.
 
DCSun
Administrator



Posts: 625
 
November 4, 2009 @ 3:30pm
Andrew,

Do you have an email address entered in Modify Site Preferences > Site Email Address ? If you do please post that output again but using the Code function of the forum, otherwise parts of it get removed.

Can you give some more information about where the site is hosted (your own computer, dedicated server, shared hosting, etc)?


David


FlexCMS v3.2 Has Been Released!
 
andrewm


Posts: 10
 
November 4, 2009 @ 5:53pm
David,
I am using a shared linux hosting account at godaddy. I do have an email address in the site preferences. Here is the output:

<br><br>Address:andrew.mcghee@loganinsurance.com<br>Title:testing newsletter title<br>Message:From: "Logan Ohio Rotary Club" <support@loganinsurance.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="FlexCMS4af204e742059"

This message was sent in HTML format, and your email client appears to be unable to display HTML emails. To view this message, please visit the archived version on our website: http://www.loganohiorotary.org/index.php/newsletter/messages.html



Logan Ohio Rotary Club
http://www.loganohiorotary.org


You have received the Logan Ohio Rotary Club newsletter because you are a member at our website or have requested your name be added to our subscription list. If you wish to be removed from this mailing list, please click (or cut/paste into your web browser) this link:
http://www.loganohiorotary.org/index.php/newsletter/unsubscribe_confirm/andrew.mcghee@loganinsurance.com/Z0OI69GDPBIW621VS6UL

--FlexCMS4af204e742059
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: base64

VGhpcyBtZXNzYWdlIHdhcyBzZW50IGluIEhUTUwgZm9ybWF0LCBhbmQgeW91ciBlbWFpbCBjbGll
bnQgYXBwZWFycyB0byBiZSB1bmFibGUgdG8gZGlzcGxheSBIVE1MIGVtYWlscy4gIFRvIHZpZXcg
dGhpcyBtZXNzYWdlLCBwbGVhc2UgdmlzaXQgdGhlIGFyY2hpdmVkIHZlcnNpb24gb24gb3VyIHdl
YnNpdGU6IGh0dHA6Ly93d3cubG9nYW5vaGlvcm90YXJ5Lm9yZy9pbmRleC5waHAvbmV3c2xldHRl
ci9tZXNzYWdlcy5odG1sCgoKCkxvZ2FuIE9oaW8gUm90YXJ5IENsdWIKaHR0cDovL3d3dy5sb2dh
bm9oaW9yb3Rhcnkub3JnCgoKWW91IGhhdmUgcmVjZWl2ZWQgdGhlIExvZ2FuIE9oaW8gUm90YXJ5
IENsdWIgbmV3c2xldHRlciBiZWNhdXNlIHlvdSBhcmUgYSBtZW1iZXIgYXQgb3VyIHdlYnNpdGUg
b3IgaGF2ZSByZXF1ZXN0ZWQgeW91ciBuYW1lIGJlIGFkZGVkIHRvIG91ciBzdWJzY3JpcHRpb24g
bGlzdC4gSWYgeW91IHdpc2ggdG8gYmUgcmVtb3ZlZC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vZ2Fub2hpb3JvdGFyeS5vcmcvaW5kZXgucGhwL25ld3NsZXR0ZXIvdW5zdWJzY3JpYmVfY29u
ZmlybS9hbmRyZXcubWNnaGVlQGxvZ2FuaW5zdXJhbmNlLmNvbS9aME9JNjlHRFBCSVc2MjFWUzZV
TCIgdGFyZ2V0PSJfYmxhbmsiPmh0dHA6Ly93d3cubG9nYW5vaGlvcm90YXJ5Lm9yZy9pbmRleC5w
aHAvbmV3c2xldHRlci91bnN1YnNjcmliZV9jb25maXJtL2FuZHJldy5tY2doZWVAbG9nYW5pbnN1
cmFuY2UuY29tL1owT0k2OUdEUEJJVzYyMVZTNlVMPC9hPjxicj48YnI+PC9mb250PjwvZm9udD4=
<br><br><br />
<b>Warning</b>: mail(): Bad parameters to mail() function, mail not sent. in <b>/home/content/t/h/e/thecyberhost/html/rotary/inc-nl-admin-newsletter_sendfinal.php</b> on line <b>105</b><br />
<br><br>Address:valeryjunge@hotmail.com<br>Title:testing newsletter title<br>Message:From: "Logan Ohio Rotary Club" <support@loganinsurance.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="FlexCMS4af204e749820"

This message was sent in HTML format, and your email client appears to be unable to display HTML emails. To view this message, please visit the archived version on our website: http://www.loganohiorotary.org/index.php/newsletter/messages.html



Logan Ohio Rotary Club
http://www.loganohiorotary.org
 
DCSun
Administrator



Posts: 625
 
November 4, 2009 @ 6:05pm
Everything looks okay there, I just wasn't seeing the other parts with the forum removing what it thought were HTML tags.

What does your contact form do when you submit it?


David


FlexCMS v3.2 Has Been Released!
 
DCSun
Administrator



Posts: 625
 
November 4, 2009 @ 6:11pm
You can also try adding this before the mail line:
Code

ini_set('sendmail_from', $Settings['ContactEmail']);


David


FlexCMS v3.2 Has Been Released!
 
andrewm


Posts: 10
 
November 4, 2009 @ 6:31pm
David,
Found part of the error:
if (mail($row4['Email'], $StrippedTitle, "", $MessageHeaders, '-f'.$Settings['ContactEmail'])) {

Remove the "", and the emails will send:

if (mail($row4['Email'], $StrippedTitle, $MessageHeaders, '-f'.$Settings['ContactEmail'])) {

only thing now is when i receive the email it is telling me I can't receive html emails
 
DCSun
Administrator



Posts: 625
 
November 4, 2009 @ 6:55pm
Ya that makes sense since the parameters aren't in the right places anymore. What used to be the message is now being filled with the headers that are usually hidden.

Instead of removing the "" try replacing it with $PlainTextMessage


FlexCMS v3.2 Has Been Released!
 

Last Edit: November 4, 2009 @ 6:56pm by DCSun
andrewm


Posts: 10
 
November 6, 2009 @ 5:46pm
tried that still no go. the contact form works perfect by the way.
 
DCSun
Administrator



Posts: 625
 
November 6, 2009 @ 6:03pm
How about this:


Code

ini_set('sendmail_from', $Settings['ContactEmail']);
if (mail($row4['Email'], $StrippedTitle, "", $MessageHeaders)) {

or

Code

ini_set('sendmail_from', $Settings['ContactEmail']);
if (mail($row4['Email'], $StrippedTitle, $PlainTextMessage, $MessageHeaders)) {


The contact form is much more basic, it doesn't use the HTML format and headers, so it's only a small comparison.


FlexCMS v3.2 Has Been Released!
 

Last Edit: November 6, 2009 @ 6:05pm by DCSun
andrewm


Posts: 10
 
November 6, 2009 @ 6:05pm
it has something to do with the message headers. if i remove all the headers:
$MessageHeaders .= "MIME-Version: 1.0\r\n";
$MessageHeaders .= "Content-Type: multipart/alternative;\r\n boundary=\"".$BoundaryID."\"\r\n\r\n";
$MessageHeaders .= $PlainTextMessage;
$MessageHeaders .= "--".$BoundaryID."\r\n".
"Content-Type: text/plain; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$MessageHeaders .= chunk_split(base64_encode($PlainTextMessage));
$MessageHeaders .= "--".$BoundaryID."\r\n".
"Content-Type: text/html; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$MessageHeaders .= chunk_split(base64_encode($HTMLMessage));

and replace with:

$MessageHeaders .= $HTMLMessage

it sends the email with correct Title and From fields but doesn't format the HTML correctly in the email so you just see the HTML code. Does this help?
 
DCSun
Administrator



Posts: 625
 
November 6, 2009 @ 7:01pm
We've never had this problem before, and that code has been the same in there for a couple years now, so at the risk of blaming the hosting company it seems as if maybe GoDaddy is blocking sending mail with certain content in it (HTML perhaps?). They are notorious for restricting their systems in very strange ways.

Try this and see what happens:

Code

$MessageHeaders .= 'MIME-Version: 1.0' . "\r\n";
$MessageHeaders .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

ini_set('sendmail_from', $Settings['ContactEmail']);
if (mail($row4['Email'], $StrippedTitle, $HTMLMessage, $MessageHeaders)) {


or


Code

$MessageHeaders .= 'MIME-Version: 1.0' . "\r\n";
$MessageHeaders .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

if (mail($row4['Email'], $StrippedTitle, $HTMLMessage, $MessageHeaders, '-f'.$Settings['ContactEmail'])) {



The headers definitely need to be there, that's what tells it to display the message as HTML instead of plain text.


FlexCMS v3.2 Has Been Released!
 

Last Edit: November 6, 2009 @ 7:03pm by DCSun
andrewm


Posts: 10
 
November 7, 2009 @ 9:42am
The first one did it. I agree it is most likely GoDaddy restriction on headers. Thank you for your help. FlexCMS is probably one of the simplest full featured CMS products I have used. Thank you again for your help and I will definately be upgrading as we add more features to the site.
 
DCSun
Administrator



Posts: 625
 
November 7, 2009 @ 12:56pm
Not a problem, glad you finally got it going. I'll add this to the list for future investigation and see if we figure out a modification that works with GoDaddy but still offers all the features it previously had (your current configuration there is going to only display properly for people who have HTML mail clients, which I guess presently will be most of them). Also keep in mind that you've made that modification for any future upgrades you do.

The other areas that might bite you are the forum/message board (sends out optional notification emails when new messages are posted), the store (order and shipping confirmations), and general site functions like registration confirmation, lost password, email this page/article, etc. I'd have to go through them all to make sure but I think you might be okay, the newsletter may be the only one that's tied to the editor and offers HTML formatted emails in this version. The others should be the simple version without headers just like the contact form.

When you get a moment could you please post or email to the IP of the server you're currently hosted on (should be listed in the FlexCMS control panel under View Server and Version Information), and what exactly GoDaddy calls the hosting package you have. That will help us with further testing on that issue in the future. I'd love to test out some other options on your exact account if you'd like to give us your FTP information, but if not that's definitely understandable.

Thanks for using FlexCMS, we're glad you like it!

David


FlexCMS v3.2 Has Been Released!
 

Last Edit: November 7, 2009 @ 12:57pm by DCSun
fbwebdes


Posts: 8
 
sending error on news letterMarch 24, 2010 @ 7:50pm
I get same error, read all the posts but cant get it working. I too am using godaddy hosting account.

Server Information:
Platform:
Apache PHP Version:
4.3.11
GD Version: bundled (2.0.28 compatible)
GIF Creation Support: Yes

MySQL Version:
5.0.67.d7-ourdelta-log

Server IP Address:
68.178.254.110
 

Last Edit: March 24, 2010 @ 7:51pm by fbwebdes
andrewm


Posts: 10
 
File NameMay 11, 2011 @ 3:16pm
For anyone with a godaddy host and getting this error, the file that needs modified is inc-nl-admin-newsletter_sendfinal.php

around line 82 replace this:

Code


$MessageHeaders = 'From: "'.$Settings['SiteName'].'" <'.$Settings['ContactEmail'].'>'."\r\n";
$MessageHeaders .= "MIME-Version: 1.0\r\n";
$MessageHeaders .= "Content-Type: multipart/alternative;\r\n boundary=\"".$BoundaryID."\"\r\n\r\n";
$MessageHeaders .= $PlainTextMessage;
$MessageHeaders .= "--".$BoundaryID."\r\n".
"Content-Type: text/plain; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$MessageHeaders .= chunk_split(base64_encode($PlainTextMessage));
$MessageHeaders .= "--".$BoundaryID."\r\n".
"Content-Type: text/html; charset=ISO-8859-1\r\n".
"Content-Transfer-Encoding: base64\r\n\r\n";
$MessageHeaders .= chunk_split(base64_encode($HTMLMessage));

}
else {
$Message = "\n".$StrippedMessage."\n\n\n\n".$Settings['SiteName']."\n".$BaseURL."\n\n\n".$MsgText[5][28].":\n".$MainURL."/newsletter/unsubscribe_confirm/".$row4['Email']."/".$row4['ConfirmationCode'];

$MessageHeaders = 'From: "'.$Settings['SiteName'].'" <'.$Settings['ContactEmail'].'>'."\r\n";
$MessageHeaders .= 'MIME-Version: 1.0'."\r\n".'Content-Type: text/plain; charset="iso-8859-1"'."\r\n".'Content-Transfer-Encoding: 7bit'."\r\n\r\n";
$MessageHeaders .= $Message;
}


if (mail($row4['Email'], $StrippedTitle, "", $MessageHeaders, '-f'.$Settings['ContactEmail'])) {


with this:

Code



$MessageHeaders = 'From: "'.$Settings['SiteName'].'" <'.$Settings['ContactEmail'].'>'."\r\n";
$MessageHeaders .= 'MIME-Version: 1.0' . "\r\n";
$MessageHeaders .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";





}
else {
$Message = "\n".$StrippedMessage."\n\n\n\n".$Settings['SiteName']."\n".$BaseURL."\n\n\n".$MsgText[5][28].":\n".$MainURL."/newsletter/unsubscribe_confirm/".$row4['Email']."/".$row4['ConfirmationCode'];

$MessageHeaders = 'From: "'.$Settings['SiteName'].'" <'.$Settings['ContactEmail'].'>'."\r\n";
$MessageHeaders .= 'MIME-Version: 1.0'."\r\n".'Content-Type: text/plain; charset="iso-8859-1"'."\r\n".'Content-Transfer-Encoding: 7bit'."\r\n\r\n";
$MessageHeaders .= $Message;
}

ini_set('sendmail_from', $Settings['ContactEmail']);
if (mail($row4['Email'], $StrippedTitle, $HTMLMessage, $MessageHeaders)) {


Again this is flexcms 3.1, I am going to upgrade to 3.2.1 and will post if the same changes need made after the upgrade
 
andrewm


Posts: 10
 
Results after upgrade to 3.2.1May 11, 2011 @ 4:49pm
After upgrading, there was no error message and it went through the process of sending, but then I never received the newsletter email. So back to the original fix editing inc-nl-admin-newsletter_sendfinal.php and everything works again.
 

Pages:  [1]  2  

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.06352 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS