fix send mail order

This commit is contained in:
Manuel Raynaud
2014-02-03 13:41:40 +01:00
parent ce80360a23
commit 1548194a1c

View File

@@ -366,7 +366,7 @@ class Order extends BaseAction implements EventSubscriberInterface
*/
public function sendOrderEmail(OrderEvent $event)
{
$contact_email = ConfigQuery::read('contact_email');
$contact_email = ConfigQuery::read('store_email');
if ($contact_email) {
@@ -389,11 +389,11 @@ class Order extends BaseAction implements EventSubscriberInterface
$instance = \Swift_Message::newInstance()
->addTo($customer->getEmail(), $customer->getFirstname()." ".$customer->getLastname())
->addFrom(ConfigQuery::read('contact_email'), ConfigQuery::read('company_name'))
->addFrom($contact_email, ConfigQuery::read('store_name'))
;
// Build subject and body
$message->build($this->parser, $instance);
$message->buildMessage($this->parser, $instance);
$this->getMailer()->send($instance);
}