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

How to change the FROM name when xcart sends emails

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 08-09-2006, 10:27 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default

Quote:
Originally Posted by tahirfayyaz
I have changed it but still no luck

Where do I change company name to appear in email from field?
In 4.1 they changed the variable name from $m_from to $mail_from. So for 4.1 look for:
Code:
$mail_from = $from;
and replace it with this:
Code:
switch ($from) { case $config["Company"]["users_department"]: case $config["Company"]["site_administrator"]: case $config["Company"]["orders_department"]: case $config["Company"]["support_department"]: case $config["Company"]["newsletter_email"]: $mail_from = $config["Company"]["company_name"].'<'.$from.'>'; break; default: $mail_from = $from; }
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote
  #12  
Old 08-09-2006, 10:41 AM
 
tahirfayyaz tahirfayyaz is offline
 

Senior Member
  
Join Date: May 2006
Posts: 125
 

Default

Quote:
Originally Posted by geckoday
In 4.1 they changed the variable name from $m_from to $mail_from. So for 4.1 look for:
Code:
$mail_from = $from;
I cant find that. This is what I have in func.php at the moment

$m_from = $from;
if ($config["Email"]["use_base64_headers"] == "Y")
$mail_subject = func_mail_quote($mail_subject,$charset);
__________________
Tahir
X-Cart Gold v4.4.4 [win]
Reply With Quote
  #13  
Old 08-09-2006, 11:48 AM
 
geckoday geckoday is offline
 

X-Wizard
  
Join Date: Aug 2005
Posts: 1,073
 

Default

Quote:
Originally Posted by tahirfayyaz
I cant find that. This is what I have in func.php at the moment

$m_from = $from;
if ($config["Email"]["use_base64_headers"] == "Y")
$mail_subject = func_mail_quote($mail_subject,$charset);
Which version are you modifying? Your signature says you are on 4.1. func.php doesn't exist on 4.1. If you are modifying a 4.0 version use the first change I posted.

Also, after a closer look there are two places to change. Both are in func.php for 4.0 and func.mail.php in 4.1. The functions within those files are func_send_mail and func_send_simple_mail. The changes for func_send_mail for the two different versions are posted above. For func_send_simple mail in either version look for this:
Code:
else { $m_from = $from; $m_subject = $subject; }
And replace it with this:
Code:
else { $m_from = $from; $m_subject = $subject; } switch ($m_from) { case $config["Company"]["users_department"]: case $config["Company"]["site_administrator"]: case $config["Company"]["orders_department"]: case $config["Company"]["support_department"]: case $config["Company"]["newsletter_email"]: $m_from = $config["Company"]["company_name"].'<'.$m_from.'>'; break; }
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]

UGG Boots and other fine sheepskin products
http://www.snowriver.com
Reply With Quote

The following user thanks geckoday for this useful post:
necroflux (06-30-2009)
  #14  
Old 09-29-2008, 05:48 AM
  phicaloma's Avatar 
phicaloma phicaloma is offline
 

Advanced Member
  
Join Date: Nov 2007
Location: Paris - France
Posts: 34
 

Default Re: How to change the FROM name when xcart sends emails

Quote:
Originally Posted by geckoday
Which version are you modifying? Your signature says you are on 4.1. func.php doesn't exist on 4.1. If you are modifying a 4.0 version use the first change I posted.

Also, after a closer look there are two places to change. Both are in func.php for 4.0 and func.mail.php in 4.1. The functions within those files are func_send_mail and func_send_simple_mail. The changes for func_send_mail for the two different versions are posted above. For func_send_simple mail in either version look for this:
Code:
else { $m_from = $from; $m_subject = $subject; }
And replace it with this:
Code:
else { $m_from = $from; $m_subject = $subject; } switch ($m_from) { case $config["Company"]["users_department"]: case $config["Company"]["site_administrator"]: case $config["Company"]["orders_department"]: case $config["Company"]["support_department"]: case $config["Company"]["newsletter_email"]: $m_from = $config["Company"]["company_name"].'<'.$m_from.'>'; break; }

Hello,

I tried all this...to no avail (nothing changed, newsletter test arriving ok but with just the email address, not the company's name).

I have version X-Cart 4.1.9.

Have any clues...?

Thank you in advance for your answer,

Cheers

Philippe
__________________
X-Cart Gold 4.1.9 - 4.2.0 - 4.2.2
Telafirma: Dynamic Images, Narrow by Manufacturer, Product Page manufacturer, Static Pages Categories, Multicolumn Recommends
Firetank Software: Featured Products, Feed Manager, Newest Products, Sitemap Pro, Marketing Manager
Xcartmods: Ultimate Minicart, 4 Level Horizontal (and Vcal) Flyout

BCSE: Reviews Edit, Multiple Upselling
MagenticOne: Tag Cloud, Store Manager, Custom Data Feed
Websitecm: Xnews, Xnews SEO, CDSEO Pro
Jon Langevin: Gone With The Wind !
Reply With Quote
  #15  
Old 06-30-2009, 10:30 AM
 
necroflux necroflux is offline
 

Advanced Member
  
Join Date: Feb 2009
Posts: 47
 

Default Re: How to change the FROM name when xcart sends emails

Just a note, on my x-cart version (4.2) there is a section with the variable $mail_from further up that geckoday's code worked perfectly on. Thanks Gecko!! Inexcusable X-cart doesn't do this already...
__________________
-----------------
X-cart version 4.2.1
Reply With Quote
  #16  
Old 01-20-2012, 05:26 PM
 
Angelos G. Angelos G. is offline
 

Newbie
  
Join Date: Jan 2012
Posts: 3
 

Default Re: How to change the FROM name when xcart sends emails

Just a note: You can use company_website to display the website name instead of company_name which displays the company name. It can be useful when the website has a different trading name the the customers are familiar with.

-Angelos
__________________
x-cart gold v4.4.4
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 06:48 AM.

   

 
X-Cart forums © 2001-2020