Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

images in confirmation emails as links not attachments

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-02-2006, 09:47 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default images in confirmation emails as links not attachments

Not sure if this is a issue related because im using 4.0.5 or not but if anyone has come across this before please let me know.

I've noticed that in the HTML emails that get sent out with order confirmations the images like company logo , any spacers I have are sent as attachments with the emails so in some cases these are adding spam points to some spam filters.

Does anyone know how to change it so that the images are linked to whats held on our server rather than attached, there is nothing in order_invoice.tpl that indicates so I assume it's in one of the php files somewhere.
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #2  
Old 09-03-2006, 11:01 PM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default Re: images in confirmation emails as links not attachments

Sorry to reply to my own post but x-cart provided me with a fix and so for the benefit of others here it is.

in include/func.php find this code

Code:
if($config["Email"]["html_mail"] == "Y") { list($mail_message, $tmp) = func_attach_images($mail_message); if(!empty($tmp)) { foreach($tmp as $k => $v) $files[] = $v; } }

and replace with

Code:
/* if($config["Email"]["html_mail"] == "Y") { list($mail_message, $tmp) = func_attach_images($mail_message); if(!empty($tmp)) { foreach($tmp as $k => $v) $files[] = $v; } } */

so basicilly you have just commented out that section of code in include/func.php

and then in skin1/mail/html replace all
Code:
{$ImagesDir}
with
Code:
{$http_location}/skin1/images/
or if you are using https in the section where invoices are shown on your x-cart site
Code:
{$https_location}/skin1/images/

the easiest way is just to do a search and replace in dreamweaver on the whole skin1/mail/html/ folder

and it should all work fine now without the emails having logos etc as attachments
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #3  
Old 12-29-2007, 10:23 AM
 
JonStout JonStout is offline
 

Member
  
Join Date: May 2007
Posts: 12
 

Default Re: images in confirmation emails as links not attachments

Just wanted to confirm and update this for 4.1.9.

now the PHP file is under include/func/func.mail.php

I commented this line:

Quote:
list($mail_message, $files) = func_attach_images($mail_message);

And then, in the email template files, I replaced
Quote:
{$ImagesDir}

with
Quote:
{$http_location}/skin1/images/

(be careful of the trailing slash -- you may get doubles "//"

I haven't had any secure pages, but it seems to have worked fine for all regular non-secure emails.
__________________
X-Cart Gold [unix]
Version 4.1.12
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:25 AM.

   

 
X-Cart forums © 2001-2020