Skip to Content Skip to Menu

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

  • Sven
  • Sven
  • OFFLINE
  • Posts: 24
  • Thanks: 1
  • Karma: 0
13 years 9 months 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 or Create an account to join the conversation.

  • becca800
  • becca800
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
13 years 7 months 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 or Create an account to join the conversation.

  • Sven
  • Sven
  • OFFLINE
  • Posts: 24
  • Thanks: 1
  • Karma: 0
13 years 7 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 or Create an account to join the conversation.

  • MacJoomla
  • MacJoomla
  • OFFLINE
  • Posts: 39
  • Thanks: 6
  • Karma: 1
13 years 7 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
Code:
$mailtext = stripslashes($mailtext); $mailtext = wordwrap($mailtext, 70); // Just to be safe that SMTP-send works $subject = stripslashes($subject);

and replace it with:
Code:
$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 or Create an account to join the conversation.

  • Sven
  • Sven
  • OFFLINE
  • Posts: 24
  • Thanks: 1
  • Karma: 0
13 years 7 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 or Create an account to join the conversation.

  • Kampp
  • Kampp
  • OFFLINE
  • Posts: 76
  • Thanks: 10
  • Karma: 12
13 years 4 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum