Skip to content

Commit

Permalink
Removed code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Wharton committed Oct 16, 2018
1 parent b6f9e48 commit 0dc8578
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,17 @@ public function setReplyTo($email, $name = null)
/**
* Set mail from address
*
* @deprecated Use setFromByStore
* @deprecated This function sets the from address for the first store only.
* new function setFromByStore introduced to allow setting of from address
* based on store.
* @see setFromByStore()
*
* @param string|array $from
* @return $this
*/
public function setFrom($from, $store = null)
public function setFrom($from)
{
$result = $this->_senderResolver->resolve($from, $store);
$this->message->setFrom($result['email'], $result['name']);
return $this;
return($this->setFromByStore($from));
}

/**
Expand Down

0 comments on commit 0dc8578

Please sign in to comment.