Easy fix? Make order notifications FROM "customer email" instead of "Company Name"

My client wants to me to change the NEW ORDER NOTIFICATION email.



The “from:” is currently our company name, which is set as “email@company.com” entered in the admin panel > settings > Company > Order department e-mail address



They would like it to make the email appear in their inbox as From: “customerEmailAddress@whatever.com



The .tpl files in the Mail section only deal with the body of the various messages, so I think I have to change the lib/phpmailer/class.phphmailer.php file:


```php

/**

  • Sets the From email address for the message.
  • @var string

    */

    public $From = 'root@localhost';

    /**
  • Sets the From name of the message.
  • @var string

    */

    public $FromName = 'Root User';

    ```



    This looks like the right place, but I suck at PHP.



    Some people on this forum are PHP Gods, anyone know a quick fix for this?



    Also, I'm using the “via PHP mail function” for my emails.



    -Matt

The other thing is, I only want it to affect the new order notification email. There are about a dozen other emails that CS Cart generates for other purposes using this same script…



Complicates things a bit.

Wouldn't this mean the client would get email from himself? That might look weird.



If the problem is that you can't reply to order mails… I'm assuming you are using google apps?

Hey Flow!


[quote][color=#282828][font=arial, verdana, tahoma, sans-serif]Wouldn't this mean the client would get email from himself? That might look weird. [/font][/color][/quote]

Yes, yes it would. I guess I'd have to handle customer and orders department emails separately (somehow!)


[quote][color=#282828][font=arial, verdana, tahoma, sans-serif]If the problem is that you can't reply to order mails… I'm assuming you are using google apps? (I ask this with a reason)[/font][/color][/quote]



Not exactly. The client wants the customer's email address in the FROM: field so that they can integrate it with their CRM program (which is GoldMine).



Currently, the order-entry department takes each new order email and manually fills the data into their CRM. If I could just have the new order notification email come from the customer's email address, the whole thing would be automated and save the company man-hours, which as we all know, equals money.



We are using Google Aps, but they've got Microsoft Outlook rigged up with the GoldMine CRM to automate the whole thing.

Aha. I thought about doing that as well, but I am afraid it will become very messy in time. Imagine having 20 big order emails attached to each customer…



Instead I’m working on a crm synchronisation add-on using Capsule CRM, which I absolutely love. I tried many but this is the first one my collegues actually use.



With the add-on, all orders and customer details will be synced between the shop and crm system in real time. Capsule has a very handy Google mail raplet so with it I can see customer data in gmail, click on a customer, add tasks, and also see previous orders and user notes.



Capsule already has mailchimp integration too, as well as Xero.com for which an add-on is being made now as well. So I’m hoping this will make a very strong package alltogether without the need of a huge ERP system.



P.S. yep, the capsule link IS an affiliate link! :D

I want a new CRM so bad, but the company is totally mired in the crap-tastic one they've got.



Migrating thousands of contacts and training 30 people to use new software prevents any thought of switching.



sadface.jpg



Capsule looks nice, though. I'd love to get on that.

Well, switching IS a pain. And goldmine isn't that bad!

You know, and it should be their decision. If you convince them and things go bad, you're the one to blame.



I'm sure what you want is pretty easy to do…either in cs-cart or maybe even in goldmine so it takes the reply-to address?



Anyway, the function that sends mail is located in the core/fn.common.php file. Look for fn_send_mail()

Any reasonable SMTP server will immediately flag an email with a falsified FROM address as spam.

yeah that too :)



You could probably have cs-cart sent out the order notification mail to customer, and then put your crm’s dropbox mail address in bcc though.

[quote name='tbirnseth' timestamp='1344832851' post='142754']

Any reasonable SMTP server will immediately flag an email with a falsified FROM address as spam.

[/quote]



Good point…