Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
02cfec5d
Commit
02cfec5d
authored
May 10, 2019
by
nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S34694741 # Client - Incoming Issues (raised by Client) #Email Ingest not working (quickly)
parent
f3119510
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
PerformaEmailFetcher.java
cmsWebApp/src/performa/utils/PerformaEmailFetcher.java
+16
-8
No files found.
cmsWebApp/src/performa/utils/PerformaEmailFetcher.java
View file @
02cfec5d
...
...
@@ -275,14 +275,22 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
if
(
message
.
getAllRecipients
()
!=
null
&&
message
.
getAllRecipients
().
length
>
0
)
{
tmpRecipient
=
((
InternetAddress
)
message
.
getAllRecipients
()[
0
]).
getAddress
();
for
(
Address
receipientAddress
:
message
.
getAllRecipients
())
{
tmpRecipient
=
((
InternetAddress
)
receipientAddress
).
getAddress
();
if
(
StringUtils
.
subBlanks
(
tmpRecipient
)
!=
null
&&
tmpRecipient
.
contains
(
"job"
))
{
tmpJobId
=
getJobIdentifierFromEmail
(
tmpRecipient
);
if
(
tmpJobId
!=
null
&&
!
tmpJobId
.
isEmpty
()
&&
StringUtils
.
isNumber
(
tmpJobId
))
{
break
;
}
}
}
}
if
(
StringUtils
.
subBlanks
(
tmpRecipient
)
!=
null
)
{
tmpJobId
=
getJobIdentifierFromEmail
(
tmpRecipient
);
}
tmpEmailText
=
EmailFetcher
.
getText
(
message
,
new
ArrayList
<>());
tmpContents
=
getAttachments
(
message
);
}
...
...
@@ -476,8 +484,8 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
public
static
String
getJobIdentifierFromEmail
(
String
strReceipient
)
{
int
index
=
strReceipient
.
indexOf
(
'@'
);
return
strReceipient
.
substring
(
0
,
index
).
replace
(
"job"
,
""
);
return
strReceipient
.
substring
(
0
,
index
).
replace
(
"job"
,
""
);
}
private
static
List
<
FileBinaryContent
>
getAttachments
(
Message
message
)
throws
IOException
,
MessagingException
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment