Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem newsletter


peppecol

Recommended Posts

The osCommerce Newsletter is a Text Newsletter. If you put html code in it then the person who receives the Newsletter will see the text and the html code.

 

To make the Newsletter HTML, edit this file:

 

admin/includes/modules/newsletters/newsletter.php

 

where you see this code:

 

$mimemessage->add_text($this->content);

 

change it to:

 

$mimemessage->add_html($this->content);

 

Any images you use must have the full pathway e.g.

 

<img src="http://www.yourdomain.com/images/thisimage.gif">

 

Vger

Link to comment
Share on other sites

The osCommerce Newsletter is a Text Newsletter.  If you put html code in it then the person who receives the Newsletter will see the text and the html code.

 

To make the Newsletter HTML, edit this file:

 

admin/includes/modules/newsletters/newsletter.php

 

where you see this code:

 

$mimemessage->add_text($this->content);

 

change it to:

 

$mimemessage->add_html($this->content);

 

Any images you use must have the full pathway e.g.

 

<img src="http://www.yourdomain.com/images/thisimage.gif">

 

Vger

 

 

thanks, hour is all ok! six state the only person who has resolved me my problem, still thanks

Link to comment
Share on other sites

  • 1 month later...

Vger, I plan to create my newsletter as a image file. Is this what i should do? the step 2 part is what i'm not sure if i'm on the right track

 

 

Step 1: To make the Newsletter HTML, edit this file:

 

admin/includes/modules/newsletters/newsletter.php

 

where you see this code:

 

$mimemessage->add_text($this->content);

 

change it to:

 

$mimemessage->add_html($this->content);

 

 

Step 2: Go to newsletter manager under the administration screen , go to Tools/ newsletter manager, click on new newsletter and paste the following onto the screen

 

<img src="http://www.yourdomain.com/images/thisimage.gif">

Link to comment
Share on other sites

  • 5 weeks later...
The osCommerce Newsletter is a Text Newsletter.  If you put html code in it then the person who receives the Newsletter will see the text and the html code.

 

To make the Newsletter HTML, edit this file:

 

admin/includes/modules/newsletters/newsletter.php

 

where you see this code:

 

$mimemessage->add_text($this->content);

 

change it to:

 

$mimemessage->add_html($this->content);

 

Any images you use must have the full pathway e.g.

 

<img src="http://www.yourdomain.com/images/thisimage.gif">

 

Vger

 

THANKS!!

:D

Link to comment
Share on other sites

Ok. I've replaced the code and prepared a nice Fireworks tabled newsletter to send to people, but the final result happens to be disastrous since the mail received is coded with a pile of "<br>" and "<tt>" tags in the beginning, what means there is a wide blank gap between the top of the message and the message itself. Like this...

 

 

 

 

 

 

 

 

 

 

 

<EMPTY>

 

 

 

 

 

 

 

 

<EMPTY>

 

 

 

 

 

 

 

 

 

 

 

 

 

<EMPTY>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MESSAGE

 

 

How can I correct this?

--

Fabian Balbinot

Link to comment
Share on other sites

Well... I ended up finding a way to avoid that huge space that appears in the beginning of an HTML newsletter, when it is made with tables and pictures (example: Fireworks).

 

First do the following (this change was already recommended by other users in other topics, and its needed to allow HTML in the newsletter):

 

Find file...

admin/includes/modules/newsletters/newsletter.php

 

...replacing this...

$mimemessage->add_text($this->content);

 

...for this...

$mimemessage->add_html($this->content);

 

 

Now, find the file admin\includes\classes\email.php

 

Find line 159 (probably)

$this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html);

 

replace it with

$this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '', $html);

 

 

That annoying <br> tag is the one that messes up with the message, placing a line in the beginning for every image you have in your message.

 

Notice you will still see the spaces in the beginning of the message output while editing it in oscommerce, but the email sent will have no spaces.

 

 

Regards.

--

Fabian Balbinot

Link to comment
Share on other sites

  • 1 month later...

Ok. Now I have a problem.

 

I made the changes in the newsletter.php file, but when I put the html code into the newsletter it does not show the page, it shows the code

 

This is what shows up in preview.

 

 Get Them While They're Hot! 
 title=" Get Them While They're Hot! " 
alt="Get Them While They're Hot!" 
border=0> 



 src="http://divinedivasgr.com/osCommerce/catalog/images/pixel_trans.gif" 
width="100%" border=0> 






Displaying 1 to 9 (of 17 
specials) 
Result Pages: 
1   href="http://divinedivasgr.com/osCommerce/catalog/specials.php/page/2"> color=#0000ff>2   title=" Next Page " 
href="http://divinedivasgr.com/osCommerce/catalog/specials.php/page/2"> color=#0000ff>[Next >>]  



 src="http://divinedivasgr.com/osCommerce/catalog/images/pixel_trans.gif" 
width="100%" border=0> 






href="http://divinedivasgr.com/osCommerce/catalog/product_info.php/products_id/31"> title=" HZ8004 Human " height=148 alt="HZ8004 Human" 
src="http://divinedivasgr.com/osCommerce/catalog/images/171_IH8004_m.jpg" 
width=95 border=0>
href="http://divinedivasgr.com/osCommerce/catalog/product_info.php/products_id/31"> color=#000000>HZ8004 Human
$39.99
class=productSpecialPrice> color=#ff0000>$34.99 
href="http://divinedivasgr.com/osCommerce/catalog/product_info.php/products_id/30"> color=#ff0000> alt="HZ8003 Human" 
src="http://divinedivasgr.com/osCommerce/catalog/images/171_IH8003_m.jpg" 
width=95 border=0>
href="http://divinedivasgr.com/osCommerce/catalog/product_info.php/products_id/30"> color=#000000>HZ8003 Human
$49.99
class=productSpecialPrice> color=#ff0000>$44.99 
href="http://divinedivasgr.com/osCommerce/catalog/product_info.php/products_id/29"> color=#ff0000> alt="HZ8001 Human" 
src="http://divinedivasgr.com/osCommerce/catalog/images/171_IH8001_m.jpg" 
width=95 border=0>
href="http://divinedivasgr.com/osCommerce/catalog/product_info.php/products_id/29"> color=#000000>HZ8001 Human
$49.99
class=productSpecialPrice> color=#ff0000>$44.99 


 src="http://divinedivasgr.com/osCommerce/catalog/images/pixel_trans.gif" 
width="100%" border=0> 
[/quote]

What am I doing wrong?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...