Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F775839
D171.id.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
Thu, Feb 6, 10:09 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Fri, Feb 7, 10:09 AM (17 h, 34 m)
Engine
blob
Format
Raw Data
Handle
558347
Attached To
D171: INP-1519 - Generate e-mail access key after subject is prepared
D171.id.diff
View Options
Index: branches/5.3.x/core/kernel/utility/email.php
===================================================================
--- branches/5.3.x/core/kernel/utility/email.php
+++ branches/5.3.x/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