projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
05d781b
)
Import/Core_email.php
author
Alan Knowles
<alan@roojs.com>
Tue, 10 Feb 2015 10:32:40 +0000
(18:32 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 10 Feb 2015 10:32:40 +0000
(18:32 +0800)
Import/Core_email.php
patch
|
blob
|
history
diff --git
a/Import/Core_email.php
b/Import/Core_email.php
index
71f4730
..
f887764
100644
(file)
--- a/
Import/Core_email.php
+++ b/
Import/Core_email.php
@@
-55,13
+55,14
@@
class Pman_Core_Import_Core_email extends Pman
$headers = $parts[1];
$from = new Mail_RFC822();
$from_str = $from->parseAddressList($headers['From']);
$headers = $parts[1];
$from = new Mail_RFC822();
$from_str = $from->parseAddressList($headers['From']);
- var_dump($from_str);exit;
- $from_name = explode(" ", $parts[0])[0];
- $from_email = explode(" ", $parts[0])[1];
+
+ $from_name = trim($from_str[0]->personal, '"');
+
+ $from_email = $from_str[0]->mailbox . '@' . $from_str[0]->host;
$c->setFrom(array(
$c->setFrom(array(
- 'from_name' =>
trim($from_name, '"')
,
+ 'from_name' =>
$from_name
,
'from_email' => $from_email,
'subject' => $parts[1]['Subject'],
'name' => $template_name,
'from_email' => $from_email,
'subject' => $parts[1]['Subject'],
'name' => $template_name,