X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Display company name as Email sender (https://forum.x-cart.com/showthread.php?t=63170)

designguru 10-13-2014 02:16 AM

Re: Display company name as Email sender
 
Quote:

Originally Posted by aim
Do you apply the sql patch ?

You have to fill something like 'Your Company Name <sales@yourstore.com>' to the '"From" email address ' field.


Yes, was filled in and also updated it. But I tried only to input the store name and it didn't work. Now with < > + email it worked! Also worked perfectly for the newsletter reply-to email.

Thank you again!

mcanitano 05-20-2015 07:48 AM

Re: Display company name as Email sender
 
Quote:

Originally Posted by Raptor
still problems with 4.5.1 when using SMTP (although I can now add Company Name <name@mail.com> to the SMTP 'From' text box)

contact us page not working now(using SMTP mail) and dont receive any other emails

contact us page error is

"Your message could not be sent. Please contact the store admin. "


Having the same issue as above!^^^^

Having an issue with this on XC 4.5.5, when we have the "Use SMTP server instead of internal PHP mailer" option checked in our email settings, instead of using PHP.

It shows correctly and sends to customers, but doesn't send us any emails (contact us, orders placed, etc). Because we have the display name shown.

If we get rid of this display name and set it just to a normal email, it works as it should (just so you know my SMTP settings are correct).

I believe the error is coming from include/func/func.mail.php around line 222:

Code:

    // Send recipients email addresses.
    $recipients = preg_split("/[,\s]+/", $mail_data['to']);   
    $recipients = func_array_map('trim', $recipients);


In the preg_split code (below):

Code:

    $recipients = preg_split("/[,\s]+/", $mail_data['to']);   

If we remove the "\s" it stops it from removing any spaces in the recipient e-mail addresses, but then we see this error:

Code:

    Email server declined recipient email address (Error: RCPT not accepted from server; smtp_code: 501; smtp_msg: <Display Name <example@example.com>>: "@" or "." expected after "Display")

mcanitano 05-26-2015 07:47 AM

Re: Display company name as Email sender
 
BUMP.

So it seems when you select SMTP mailing option, it still expects the emails to be sent using JUST a valid email address, and no display name is allowed.

If there's a way (maybe in the func.mail.php) you can remove the

Your Company Name <>

from

Your Company Name <sales@yourstore.com>

(so it keeps the sales@yourstore.com part)

Then I'm almost positive this will work. But we can't get this to work correctly (using PHP 5.3)


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

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