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

Display company name as Email sender

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 04-19-2012, 07:56 PM
 
lcg lcg is offline
 

Senior Member
  
Join Date: Feb 2007
Posts: 106
 

Default Re: Display company name as Email sender

Quote:
Originally Posted by qualiteam
No, in 4.0.x it is even simpler.

All you need to do is alter the "admin/configuration.php" script and replace this piece of code:
PHP Code:
$trusted_post_variables = array("gpg_key""pgp_key"); 

with this:
PHP Code:
$trusted_post_variables = array("gpg_key""pgp_key""site_administrator""users_department""orders_department""support_department""newsletter_email"); 

Hi Qualiteam,

Thanks for the information, I really missed some of the threads and just noticed that it was meant for the newsletter mailing, sorry about that

Is there a way we can make this to work with customer order notifications and all other e-mails pertaining to ordering so that the email sender's name is displayed with the store's email? (sorry if off-topic, but similar )
__________________
XCart v.4.0.18
Reply With Quote
  #12  
Old 04-20-2012, 07:41 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Display company name as Email sender

lcg it does work for all emails.

Q-Team is this possible to do in Version 4.3.2 ? I tried to adapt it but it would not take the new style of entry in the Company email fields.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #13  
Old 04-20-2012, 10:27 AM
 
lcg lcg is offline
 

Senior Member
  
Join Date: Feb 2007
Posts: 106
 

Default Re: Display company name as Email sender

Quote:
Originally Posted by hoosierglass
lcg it does work for all emails.

Q-Team is this possible to do in Version 4.3.2 ? I tried to adapt it but it would not take the new style of entry in the Company email fields.

Thanks Hoosierglass

One question, in General Settings > Company Options, for orders and department emails, should I use this type of formatting?

My Business Name <info@mybusinessname.com>
__________________
XCart v.4.0.18
Reply With Quote
  #14  
Old 04-20-2012, 11:05 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Display company name as Email sender

Yes, once you make the MODs, then you can go into general settings, company and you will change all of the company email settings to that format but on the company "from" email you will leave that as is.

I have tested this in 4.4.3 and it works like a charm. I still need to figure out 4.3.2.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #15  
Old 04-21-2012, 01:14 AM
 
lcg lcg is offline
 

Senior Member
  
Join Date: Feb 2007
Posts: 106
 

Default Re: Display company name as Email sender

Quote:
Originally Posted by hoosierglass
Yes, once you make the MODs, then you can go into general settings, company and you will change all of the company email settings to that format but on the company "from" email you will leave that as is.

I have tested this in 4.4.3 and it works like a charm. I still need to figure out 4.3.2.

In 4.0.18 I do not see a "from" email in General settings > Company options, I have:

Users department e-mail address
Site administrator e-mail address
Orders department e-mail address
Help/Support department e-mail address
Replay-To newsletter email address

I did try a test order and mail seems to display properly upon arrival, thanks for helping me out with this 4.0.18 mod and good luck testing it on 4.3.2, perhaps someone with that version will be of help, thanks again hossier. One thing I did notice that when one responds back to one of the emails, as a test customer the company name is not parsed to the e-mail client, just the email address is displayed, hope this helps someone using 4.0.18.
__________________
XCart v.4.0.18
Reply With Quote
  #16  
Old 04-23-2012, 12:20 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Display company name as Email sender

I've checked 4.3.x code, the changes should be similar to the ones for 4.4.x.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #17  
Old 05-02-2012, 03:09 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Display company name as Email sender

The updated email format can possible cause issues in connection with X-Payments since it has default validation rules for emails. Like this thread.

I'll check what can be done to avoid this and update this thread soon.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #18  
Old 05-29-2012, 01:17 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Display company name as Email sender

To make the mod working correctly with X-Payments, a slight additional modification is required.

Alter the "modules/XPayments_Connector/xpc_func.php" script and add new code:

PHP Code:
$email_matcher "/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9])/";

if (
    
preg_match($email_matcher$result['merchantEmail'], $xpc_ematches)
    && isset(
$xpc_ematches[0])
) {
    
$result['merchantEmail'] = $xpc_ematches[0];


at the end of the xpc_prepare_cart function as follows:

PHP Code:
function xpc_prepare_cart($cart$refId$force_auth)
{
.....................................................
        
$result['merchantEmail'] = $admin_email;

    }

    
$email_matcher "/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9])/";

    if (
        
preg_match($email_matcher$result['merchantEmail'], $xpc_ematches)
        && isset(
$xpc_ematches[0])
    ) {
        
$result['merchantEmail'] = $xpc_ematches[0];
    }

    return 
$result;

__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
Duramax 6.6L (05-29-2012)
  #19  
Old 07-27-2012, 09:41 PM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

Default Re: Display company name as Email sender

doesn't work with 4.5.1

get error saying

Invalid data entered into the field 'SMTP "MAIL FROM" email address'
__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote
  #20  
Old 07-30-2012, 11:48 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Display company name as Email sender

OK, I see there were no support for smtp mail from option.
I've updated the instructions, please check.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 08:11 AM.

   

 
X-Cart forums © 2001-2020