File tree Expand file tree Collapse file tree 2 files changed +586
-532
lines changed Expand file tree Collapse file tree 2 files changed +586
-532
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,13 @@ class Email implements JsonSerializable, Serializable
264
264
*/
265
265
protected $ _boundary = null ;
266
266
267
+ /**
268
+ * Contains the optional priority of the email.
269
+ *
270
+ * @var int|null
271
+ */
272
+ protected $ _priority = null ;
273
+
267
274
/**
268
275
* An array mapping url schemes to fully qualified Transport class names
269
276
*
@@ -1118,6 +1125,10 @@ public function getHeaders(array $include = [])
1118
1125
}
1119
1126
}
1120
1127
1128
+ if ($ this ->_priority ) {
1129
+ $ headers ['X-Priority ' ] = $ this ->_priority ;
1130
+ }
1131
+
1121
1132
if ($ include ['subject ' ]) {
1122
1133
$ headers ['Subject ' ] = $ this ->_subject ;
1123
1134
}
@@ -1829,6 +1840,27 @@ public function message($type = null)
1829
1840
return $ this ->_message ;
1830
1841
}
1831
1842
1843
+ /**
1844
+ * Sets priority.
1845
+ *
1846
+ * @param int|null $priority 1 (highest) to 5 (lowest)
1847
+ * @return $this
1848
+ */
1849
+ public function setPriority ($ priority ) {
1850
+ $ this ->_priority = $ priority ;
1851
+
1852
+ return $ this ;
1853
+ }
1854
+
1855
+ /**
1856
+ * Gets priority.
1857
+ *
1858
+ * @return int
1859
+ */
1860
+ public function getPriority () {
1861
+ return $ this ->_priority ;
1862
+ }
1863
+
1832
1864
/**
1833
1865
* Sets transport configuration.
1834
1866
*
You can’t perform that action at this time.
0 commit comments