fix send mail order

This commit is contained in:
Manuel Raynaud
2014-02-03 13:41:40 +01:00
parent 67a9b39bf0
commit bc61ca3d19

View File

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