Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
18639327
Commit
18639327
authored
11 years ago
by
Michael Morrison
Committed by
Peter Rotich
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Shift error checking into Mail_Parse::parseAddressList
parent
9be06d36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/class.mailparse.php
+9
-4
9 additions, 4 deletions
include/class.mailparse.php
with
9 additions
and
4 deletions
include/class.mailparse.php
+
9
−
4
View file @
18639327
...
...
@@ -397,12 +397,17 @@ class Mail_Parse {
function
parseAddressList
(
$address
){
if
(
!
$address
)
return
false
;
return
array
();
// Delivered-To may appear more than once in the email headers
if
(
is_array
(
$address
))
$address
=
implode
(
', '
,
$address
);
return
Mail_RFC822
::
parseAddressList
(
$address
,
null
,
null
,
false
);
$parsed
=
Mail_RFC822
::
parseAddressList
(
$address
,
null
,
null
,
false
);
if
(
PEAR
::
isError
(
$parsed
))
return
array
();
return
$parsed
;
}
function
parse
(
$rawemail
)
{
...
...
@@ -437,7 +442,7 @@ class EmailDataParser {
$data
=
array
();
//FROM address: who sent the email.
if
((
$fromlist
=
$parser
->
getFromAddressList
())
&&
!
PEAR
::
isError
(
$fromlist
)
)
{
if
((
$fromlist
=
$parser
->
getFromAddressList
()))
{
$from
=
$fromlist
[
0
];
//Default.
foreach
(
$fromlist
as
$fromobj
)
{
if
(
!
Validator
::
is_email
(
$fromobj
->
mailbox
.
'@'
.
$fromobj
->
host
))
continue
;
...
...
@@ -493,7 +498,7 @@ class EmailDataParser {
$data
[
'priorityId'
]
=
$parser
->
getPriority
();
$data
[
'emailId'
]
=
$emailId
;
if
((
$replyto
=
$parser
->
getReplyTo
())
&&
!
PEAR
::
isError
(
$replyto
)
)
{
if
((
$replyto
=
$parser
->
getReplyTo
()))
{
$replyto
=
$replyto
[
0
];
$data
[
'reply-to'
]
=
$replyto
->
mailbox
.
'@'
.
$replyto
->
host
;
if
(
$replyto
->
personal
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment