nobodyfamous Posted January 9, 2012 Share Posted January 9, 2012 I am having trouble tracking the process of sending mail from the newsletter and send mail tools. The emails are being sent with extra br tags. I have already removed a few nl2br's but still am getting the extra lines. The messages are being generated in CKEditor, in osc2.3.1 everything works, but I can't find where the extra br tags are coming from. Any help would be appreciated. Link to comment Share on other sites More sharing options...
nobodyfamous Posted January 10, 2012 Author Share Posted January 10, 2012 can someone just tell me what files hold what functions/classes for sending mail I can look through them my self Link to comment Share on other sites More sharing options...
nobodyfamous Posted February 3, 2012 Author Share Posted February 3, 2012 still not getting anywhere on this. Does anyone else have this issue? Link to comment Share on other sites More sharing options...
npn2531 Posted February 4, 2012 Share Posted February 4, 2012 This behavior is set in two files. See catalog/includes/classes/mime.php and catalog/classes/mail.php. Search for "EMAIL_LINEFEED" . look at the definition of the variable of $this->lf it's either "\r\n" or "\n" ; This has been rewritten in the updates for 2.3 Two contributions are also available that have changed this so that the html is email without those extra breaks. "Mailbeez" and "mail manager". You can also fix that issue with this simple hack. Create your email piece as separate webpage using your desired web editor. When you have the email looking like you want it, do the following: 1) In your web editor back space at the end of each line, header included, so that your mail piece is in on one single really long line of html code. It should still look the same online. 2) Then cut and paste that single line into the newsletter manager. Viola, no extra breaks. Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
nobodyfamous Posted February 8, 2012 Author Share Posted February 8, 2012 thanks a ton npn2531! You pointed me in the right direction. here si the fix in catalog/admin/includes/classes/email.php around line 160 find function add_html($html, $text = NULL, $images_dir = NULL) { $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br />', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); and change to this function add_html($html, $text = NULL, $images_dir = NULL) { // $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br />', $html); $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); No more extra <br /> when using the ckEditor to build Newsletters and send email from the admin area!!! Link to comment Share on other sites More sharing options...
npn2531 Posted February 9, 2012 Share Posted February 9, 2012 I'm going to write your fix down, it is way easier than the convoluted answer I posted. Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
nobodyfamous Posted February 25, 2012 Author Share Posted February 25, 2012 this has cause 1 issue - when sending out order update emails, everything is on 1 line. so, I need to fix that now. . . Link to comment Share on other sites More sharing options...
evagarbo Posted July 20, 2012 Share Posted July 20, 2012 Thank you for this simple fix, instead of deleting the <br /> I changed it to <p> and now it works in the order update emails as well. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.