Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
em
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ichikawa
em
Commits
7804f064
Commit
7804f064
authored
Apr 26, 2023
by
Kim Gyeongeun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#52593 【市川市】eモニ アンケートメール送信結果について
parent
424827ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
src/main/java/jp/agentec/sinaburocast/logic/ErrorMailCheckBatchLogic.java
+13
-5
No files found.
src/main/java/jp/agentec/sinaburocast/logic/ErrorMailCheckBatchLogic.java
View file @
7804f064
...
@@ -18,6 +18,11 @@ import javax.mail.Store;
...
@@ -18,6 +18,11 @@ import javax.mail.Store;
import
javax.mail.internet.InternetAddress
;
import
javax.mail.internet.InternetAddress
;
import
javax.transaction.UserTransaction
;
import
javax.transaction.UserTransaction
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.seasar.framework.container.annotation.tiger.Component
;
import
org.seasar.framework.container.annotation.tiger.InstanceType
;
import
jp.agentec.sinaburocast.common.util.PropertyUtil
;
import
jp.agentec.sinaburocast.common.util.PropertyUtil
;
import
jp.agentec.sinaburocast.common.util.SinaburoUtil
;
import
jp.agentec.sinaburocast.common.util.SinaburoUtil
;
import
jp.agentec.sinaburocast.entity.EnqueteMail
;
import
jp.agentec.sinaburocast.entity.EnqueteMail
;
...
@@ -30,11 +35,6 @@ import jp.agentec.sinaburocast.service.EnqueteMailSendResultService;
...
@@ -30,11 +35,6 @@ import jp.agentec.sinaburocast.service.EnqueteMailSendResultService;
import
jp.agentec.sinaburocast.service.EnqueteMailService
;
import
jp.agentec.sinaburocast.service.EnqueteMailService
;
import
jp.agentec.sinaburocast.service.NotifyMailSendResultService
;
import
jp.agentec.sinaburocast.service.NotifyMailSendResultService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.seasar.framework.container.annotation.tiger.Component
;
import
org.seasar.framework.container.annotation.tiger.InstanceType
;
@Component
(
instance
=
InstanceType
.
PROTOTYPE
)
@Component
(
instance
=
InstanceType
.
PROTOTYPE
)
public
class
ErrorMailCheckBatchLogic
{
public
class
ErrorMailCheckBatchLogic
{
private
final
Logger
logger
=
Logger
.
getLogger
(
getClass
());
private
final
Logger
logger
=
Logger
.
getLogger
(
getClass
());
...
@@ -101,6 +101,7 @@ public class ErrorMailCheckBatchLogic {
...
@@ -101,6 +101,7 @@ public class ErrorMailCheckBatchLogic {
for
(
int
indexPart
=
0
;
indexPart
<
multiPart
.
getCount
();
indexPart
++)
{
for
(
int
indexPart
=
0
;
indexPart
<
multiPart
.
getCount
();
indexPart
++)
{
final
Part
part
=
multiPart
.
getBodyPart
(
indexPart
);
final
Part
part
=
multiPart
.
getBodyPart
(
indexPart
);
final
String
disposition
=
part
.
getDisposition
();
final
String
disposition
=
part
.
getDisposition
();
if
(!
Part
.
ATTACHMENT
.
equals
(
disposition
)
&&
!
Part
.
INLINE
.
equals
(
disposition
))
{
if
(!
Part
.
ATTACHMENT
.
equals
(
disposition
)
&&
!
Part
.
INLINE
.
equals
(
disposition
))
{
InputStreamReader
reader
=
null
;
InputStreamReader
reader
=
null
;
...
@@ -125,6 +126,9 @@ public class ErrorMailCheckBatchLogic {
...
@@ -125,6 +126,9 @@ public class ErrorMailCheckBatchLogic {
Matcher
matcher
=
pattern
.
matcher
(
builder
.
toString
());
Matcher
matcher
=
pattern
.
matcher
(
builder
.
toString
());
if
(
matcher
.
find
())
{
if
(
matcher
.
find
())
{
messageId
=
matcher
.
group
(
1
).
trim
();
messageId
=
matcher
.
group
(
1
).
trim
();
}
else
{
logger
.
warn
(
"No messageId:"
+
messageId
);
logger
.
warn
(
"builder.toString():"
+
builder
.
toString
());
}
}
pattern
=
Pattern
.
compile
(
"^Status:(.*)$"
,
Pattern
.
MULTILINE
);
pattern
=
Pattern
.
compile
(
"^Status:(.*)$"
,
Pattern
.
MULTILINE
);
...
@@ -137,8 +141,12 @@ public class ErrorMailCheckBatchLogic {
...
@@ -137,8 +141,12 @@ public class ErrorMailCheckBatchLogic {
if
(
smtpErrorType
.
getCode
()
==
SmtpErrorType
.
ERR_999
.
getCode
())
{
if
(
smtpErrorType
.
getCode
()
==
SmtpErrorType
.
ERR_999
.
getCode
())
{
smtpErrorType
=
ErrorMailStatus
.
SmtpErrorType
.
toEnum
(
builder
.
toString
());
smtpErrorType
=
ErrorMailStatus
.
SmtpErrorType
.
toEnum
(
builder
.
toString
());
}
}
}
else
{
logger
.
warn
(
"No disposition:"
+
disposition
);
}
}
}
}
}
else
{
logger
.
warn
(
"No objContent:"
+
objContent
.
getClass
());
}
}
if
(!
StringUtils
.
isBlank
(
messageId
))
{
if
(!
StringUtils
.
isBlank
(
messageId
))
{
...
...
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