X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   images in confirmation emails as links not attachments (https://forum.x-cart.com/showthread.php?t=24573)

cotc2001 09-02-2006 09:47 AM

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.

cotc2001 09-03-2006 11:01 PM

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

JonStout 12-29-2007 10:23 AM

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.


All times are GMT -8. The time now is 06:59 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.