File tree 2 files changed +15
-2
lines changed
lib/internal/Magento/Framework/Mail
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,23 @@ public function getBody()
89
89
90
90
/**
91
91
* @inheritdoc
92
+ *
93
+ * @deprecated This function is missing the from name. The
94
+ * setFromAddress() function sets both from address and from name.
95
+ * @see setFromAddress()
92
96
*/
93
97
public function setFrom ($ fromAddress )
94
98
{
95
- $ this ->zendMessage ->setFrom ($ fromAddress );
99
+ $ this ->setFromAddress ($ fromAddress , null );
100
+ return $ this ;
101
+ }
102
+
103
+ /**
104
+ * @inheritdoc
105
+ */
106
+ public function setFromAddress ($ fromAddress , $ fromName = null )
107
+ {
108
+ $ this ->zendMessage ->setFrom ($ fromAddress , $ fromName );
96
109
return $ this ;
97
110
}
98
111
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ public function setFrom($from)
196
196
public function setFromByStore ($ from , $ store = null )
197
197
{
198
198
$ result = $ this ->_senderResolver ->resolve ($ from , $ store );
199
- $ this ->message ->setFrom ($ result ['email ' ], $ result ['name ' ]);
199
+ $ this ->message ->setFromAddress ($ result ['email ' ], $ result ['name ' ]);
200
200
return $ this ;
201
201
}
202
202
You can’t perform that action at this time.
0 commit comments