Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1244453
D171.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
Fri, Nov 21, 1:52 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Sat, Nov 22, 1:52 AM (11 h, 35 m)
Engine
blob
Format
Raw Data
Handle
809559
Attached To
D171: INP-1519 - Generate e-mail access key after subject is prepared
D171.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