Skip to content

Commit 0dc8578

Browse files
author
Graham Wharton
committed
Removed code duplication
1 parent b6f9e48 commit 0dc8578

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,17 @@ public function setReplyTo($email, $name = null)
177177
/**
178178
* Set mail from address
179179
*
180-
* @deprecated Use setFromByStore
180+
* @deprecated This function sets the from address for the first store only.
181+
* new function setFromByStore introduced to allow setting of from address
182+
* based on store.
183+
* @see setFromByStore()
181184
*
182185
* @param string|array $from
183186
* @return $this
184187
*/
185-
public function setFrom($from, $store = null)
188+
public function setFrom($from)
186189
{
187-
$result = $this->_senderResolver->resolve($from, $store);
188-
$this->message->setFrom($result['email'], $result['name']);
189-
return $this;
190+
return($this->setFromByStore($from));
190191
}
191192

192193
/**

0 commit comments

Comments
 (0)