Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1046577
D171.id418.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jun 28, 8:49 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Sun, Jun 29, 8:49 PM (6 h, 15 m)
Engine
blob
Format
Raw Data
Handle
676595
Attached To
D171: INP-1519 - Generate e-mail access key after subject is prepared
D171.id418.diff
View Options
Index: core/kernel/utility/email.php
===================================================================
--- core/kernel/utility/email.php
+++ core/kernel/utility/email.php
@@ -242,12 +242,28 @@
$this->_processRecipients();
$this->_changeLanguage(false);
+ // 1. set headers
+ try {
+ $message_headers = $this->_getHeaders();
+ }
+ catch ( Exception $e ) {
+ return $this->setError('Error parsing e-mail message headers');
+ }
+
+ $message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
+ $this->sender->SetSubject($message_subject);
+
+ foreach ( $message_headers as $header_name => $header_value ) {
+ $this->sender->SetEncodedHeader($header_name, $header_value);
+ }
+
if ( $this->_storeEmailLog() ) {
// 1. prepare log
$this->logData = Array (
'From' => $this->fromName . ' (' . $this->fromEmail . ')',
'To' => $this->toName . ' (' . $this->toEmail . ')',
'OtherRecipients' => serialize($this->recipients),
+ 'Subject' => $message_subject,
'Status' => EmailLogStatus::SENT,
'ErrorMessage' => '',
'SentOn' => TIMENOW,
@@ -262,25 +278,6 @@
$this->params['email_access_key'] = $this->_generateAccessKey();
}
- // 1. set headers
- try {
- $message_headers = $this->_getHeaders();
- }
- catch ( Exception $e ) {
- return $this->setError('Error parsing e-mail message headers');
- }
-
- $message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
- $this->sender->SetSubject($message_subject);
-
- foreach ($message_headers as $header_name => $header_value) {
- $this->sender->SetEncodedHeader($header_name, $header_value);
- }
-
- if ( $this->_storeEmailLog() ) {
- $this->logData['Subject'] = $message_subject;
- }
-
// 3. set body
try {
$html_message_body = $this->_getMessageBody(true);
Event Timeline
Log In to Comment