CB Public Mail - 'rn' instead of new line in mails

13 years 1 month ago #154552 by Sven
When a mail is received the message from the sender is on one line and where it should be a new line (CR/LF) there are the letters rn.

All other formatting of the mail is OK and new lines occur between the various fields, it's only the message body that doesn't get properly formatted.

My configuration:
Joomla 1.5.22
CB 1.3.1
CB Public Mail 1.2 (CB Plugin)
PHP 5.2.9
MySQL 5.0.77
Apache/2.2.3 (ClearOS)
apache2handler

Anyone that can point me in the right direction here?

/Sven

Please Log in to join the conversation.

13 years 4 days ago #158614 by becca800
I can't even download the public mail plugin. I have tried several times, but this site will not let me download it. By any chance, could you PM the zipped file? Or send me a link to it? :blink:

Please Log in to join the conversation.

12 years 11 months ago #159731 by Sven
Here's the download page:
www.joomlapolis.com/cb-solutions/directory/community-building/messaging/public-mail-visitors-can-email-registered-users

There is a link on the page, look carefully.

Any solution to my problem with 'rn' instead of new line?

/Sven

Please Log in to join the conversation.

12 years 11 months ago #159772 by MacJoomla

Sven wrote: Any solution to my problem with 'rn' instead of new line?


Following little source code editing of file "publicmail.php" made it working for me:

Go to line 161 to 163
$mailtext = stripslashes($mailtext);
		$mailtext = wordwrap($mailtext, 70); // Just to be safe that SMTP-send works
		$subject = stripslashes($subject);

and replace it with:
$mailtext = wordwrap($mailtext, 70); // Just to be safe that SMTP-send works
		$mailtext = str_replace('\r\n', "\r\n", $mailtext); // Replace Windows breaks (rn)
		$mailtext = stripslashes($mailtext);
		$subject = stripslashes($subject);

Thanks to KoFShinobi, he was writing a post, didnt working for me, but working after little rearranging: www.joomlapolis.com/forum/13-general-plugins/95507-public-mail-plugin-rn-instead-of-break

I hope this hack leaves other features working ;-)

Best regards, Macjoomla

PS: becca800, did you get you copy?

Please Log in to join the conversation.

12 years 11 months ago #159785 by Sven
Thanks, that seems to have done the trick.
I had to copy the same code to the "Send Copy" section as well.

Again, thanks,

/Sven
The following user(s) said Thank You: Kampp

Please Log in to join the conversation.

12 years 8 months ago #168701 by Kampp
This fix will be added to the next version 1.3. The new version has many improvements and new features.

Creator of the CB plugins: "User IP log" and "Public Mail"
Joomla! services/coding: www.toolmaster.dk
Joomla! services/coding: joomla-konsulent.dk
Danish Joomla! hosting: www.joomla-hosting.dk

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.291 seconds

Facebook Twitter LinkedIn