# Shopware E-Mail Aktivieren Status Mails

**URL:** https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887
**Category:** Administration
**Created:** [6. Februar 2019 um 10:39 UTC](https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887 "2019-02-06T10:39:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![BLISScamp](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@BLISScamp](https://forum.shopware.com/u/BLISScamp)
#### Post date: [6. Februar 2019 um 10:39 UTC](https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887/1 "2019-02-06T10:39:33Z")

</div>

Hallo,

wir haben aktuell folgendes Problem, dass wir gerne die System Mail sOrders (Bestellbestätigung) aktivieren würden. Wir haben diese damals von der Agentur deaktivieren lassen da alle mails von unseren anderen Warenwirtschaftssystem versendet worden sind.

Da die Schnittstelle aber gerade nicht 100% funktioniert würden wir gerne wenigstens die Eingangsbestätigung von Shopware raussenden, damit der Kunde weiß dass die Bestellung eingegangen ist.&nbsp;

Hat hier jemand Ahnung wo ich das ganze aktivieren kann ? Wie bereits gesagt, wurden alle Mails bisher vom anderen System verschickt - die Testmail von sOrders geht raus and die Standard Mail allerdings weiß ich nicht wo ich was ändern muss damit diese wieder in Kraft tritt.

Danke

&nbsp;

---

<div class="post-metadata">

### Author: ![BLISScamp](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@BLISScamp](https://forum.shopware.com/u/BLISScamp)
#### Post date: [6. Februar 2019 um 12:38 UTC](https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887/2 "2019-02-06T12:38:49Z")

</div>

\*\*  
&nbsp; &nbsp; &nbsp;\* send order confirmation mail  
&nbsp; &nbsp; &nbsp;\* @access public  
&nbsp; &nbsp; &nbsp;\*/  
&nbsp; &nbsp;&nbsp;  
&nbsp; &nbsp; {  
&nbsp; &nbsp; &nbsp; &nbsp; $variables = $this-\>eventManager-\>filter(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚Shopware\_Modules\_Order\_SendMail\_FilterVariables‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $variables,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(‚subject‘ =\> $this)  
&nbsp; &nbsp; &nbsp; &nbsp; );

&nbsp; &nbsp; &nbsp; &nbsp; $shopContext = $this-\>contextService-\>getShopContext();

&nbsp; &nbsp; &nbsp; &nbsp; $context = array(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sOrderDetails‘ =\> $variables[„sOrderDetails“],

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚billingaddress‘ &nbsp;=\> $variables[„billingaddress“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚shippingaddress‘ =\> $variables[„shippingaddress“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚additional‘ &nbsp; &nbsp; &nbsp;=\> $variables[„additional“],

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sTaxRates‘ &nbsp; &nbsp; &nbsp;=\> $variables[„sTaxRates“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sShippingCosts‘ =\> $variables[„sShippingCosts“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sAmount‘ &nbsp; &nbsp; &nbsp; &nbsp;=\> $variables[„sAmount“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sAmountNet‘ &nbsp; &nbsp; =\> $variables[„sAmountNet“],

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sOrderNumber‘ =\> $variables[„ordernumber“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sOrderDay‘ &nbsp; &nbsp;=\> $variables[„sOrderDay“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sOrderTime‘ &nbsp; =\> $variables[„sOrderTime“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sComment‘ &nbsp; &nbsp; =\> $variables[„sComment“],

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚attributes‘ &nbsp; &nbsp; =\> $variables[„attributes“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sCurrency‘ &nbsp; &nbsp;=\> $this-\>sSYSTEM-\>sCurrency[„currency“],

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sLanguage‘ &nbsp; &nbsp;=\> $shopContext-\>getShop()-\>getId(),

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sSubShop‘ &nbsp; &nbsp; =\> $shopContext-\>getShop()-\>getId(),

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sEsd‘ &nbsp; &nbsp;=\> $variables[„sEsd“],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚sNet‘ &nbsp; &nbsp;=\> $this-\>sNet,  
&nbsp; &nbsp; &nbsp; &nbsp; );

&nbsp; &nbsp; &nbsp; &nbsp; // Support for individual payment means with custom-tables  
&nbsp; &nbsp; &nbsp; &nbsp; if ($variables[„additional“][„payment“][„table“]) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $paymentTable = $this-\>db-\>fetchRow("  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT \* FROM {$variables[„additional“][„payment“][„table“]}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE userID=?",  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array($variables[„additional“][„user“][„id“])  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $context[„sPaymentTable“] = $paymentTable ? : array();  
&nbsp; &nbsp; &nbsp; &nbsp; } else {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $context[„sPaymentTable“] = array();  
&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; if ($variables[„sDispatch“]) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $context[‚sDispatch‘] = $variables[„sDispatch“];  
&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; if ($variables[‚sBookingID‘]) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $context[‚sBookingID‘] = $variables[„sBookingID“];  
&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; $mail = null;  
&nbsp; &nbsp; &nbsp; &nbsp; if ($event = $this-\>eventManager-\>notifyUntil(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚Shopware\_Modules\_Order\_SendMail\_Create‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚subject‘ &nbsp; =\> $this,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚context‘ &nbsp; =\> $context,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚variables‘ =\> $variables,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )  
&nbsp; &nbsp; &nbsp; &nbsp; )) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mail = $event-\>getReturn();  
&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; if (!($mail instanceof \Zend\_Mail)) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mail = Shopware()-\>TemplateMail()-\>createMail(‚sORDER‘, $context);  
&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; $mail-\>addTo($this-\>sUserData[„additional“][„user“][„email“]);

&nbsp; &nbsp; &nbsp; &nbsp; if (!$this-\>config-\>get(„sNO\_ORDER\_MAIL“)) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mail-\>addBcc($this-\>config-\>get(‚sMAIL‘));  
&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; $mail = $this-\>eventManager-\>filter(‚Shopware\_Modules\_Order\_SendMail\_Filter‘, $mail, array(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚subject‘ &nbsp; =\> $this,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚context‘ &nbsp; =\> $context,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚variables‘ =\> $variables,  
&nbsp; &nbsp; &nbsp; &nbsp; ));

&nbsp; &nbsp; &nbsp; &nbsp; if (!($mail instanceof \Zend\_Mail)) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;  
&nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; $this-\>eventManager-\>notify(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚Shopware\_Modules\_Order\_SendMail\_BeforeSend‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚subject‘ &nbsp; =\> $this,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚mail‘ &nbsp; &nbsp; &nbsp;=\> $mail,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚context‘ &nbsp; =\> $context,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚variables‘ =\> $variables,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )  
&nbsp; &nbsp; &nbsp; &nbsp; );

&nbsp; &nbsp; &nbsp; &nbsp; $shouldSendMail = !(bool) $this-\>eventManager-\>notifyUntil(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚Shopware\_Modules\_Order\_SendMail\_Send‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚subject‘ =\> $this,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚mail‘ =\> $mail,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚context‘ =\> $context,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚variables‘ =\> $variables,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )  
&nbsp; &nbsp; &nbsp; &nbsp; );

&nbsp; &nbsp; &nbsp; &nbsp; if ($shouldSendMail && $this-\>config-\>get(‚sendOrderMail‘)) {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mail-\>send();  
&nbsp; &nbsp; &nbsp; &nbsp; }  
&nbsp; &nbsp; }

---

<div class="post-metadata">

### Author: ![BLISScamp](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@BLISScamp](https://forum.shopware.com/u/BLISScamp)
#### Post date: [6. Februar 2019 um 13:05 UTC](https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887/3 "2019-02-06T13:05:26Z")

</div>

Ich habe außerdem gerade noch eine test.php auf den Server geladen und getestet ob die mail funktion aktiviert ist.

Die mail kam an, also kann es doch nur noch wo anders liegen das der Kunde keine EB bekommt.

---

<div class="post-metadata">

### Author: ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)
#### Post date: [6. Februar 2019 um 14:44 UTC](https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887/4 "2019-02-06T14:44:52Z")

</div>

Man kann das per config.php überschreiben. Mal da schauen&nbsp;

---

<div class="post-metadata">

### Author: ![BLISScamp](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@BLISScamp](https://forum.shopware.com/u/BLISScamp)
#### Post date: [7. Februar 2019 um 06:27 UTC](https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887/5 "2019-02-07T06:27:43Z")

</div>

Hi,&nbsp;

wenn ich in die Config.php reinschaue sind hier nur die daten

\<?php   
 return array( &nbsp; &nbsp; 'db' =\\> array( &nbsp; &nbsp; &nbsp; &nbsp; 'username' =\\> 'xxxxx', &nbsp; &nbsp; &nbsp; &nbsp; 'password' =\\> 'xxxxx', &nbsp; &nbsp; &nbsp; &nbsp; 'dbname' =\\> 'xxxxx', &nbsp; &nbsp; &nbsp; &nbsp; 'host' =\\> 'xxxxx', &nbsp; &nbsp; &nbsp; &nbsp; 'port' =\\> 'xxxx' &nbsp; &nbsp; ) ); &nbsp;

---

<div class="post-metadata">

### Author: ![BLISScamp](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@BLISScamp](https://forum.shopware.com/u/BLISScamp)
#### Post date: [7. Februar 2019 um 13:48 UTC](https://forum.shopware.com/t/shopware-e-mail-aktivieren-status-mails/57887/6 "2019-02-07T13:48:06Z")

</div>

hat sonst denn keiner eine idee ?&nbsp;
