Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pdstask
Project
Project
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
曲欣亮
pdstask
Commits
3fce14a9
Commit
3fce14a9
authored
Nov 06, 2020
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
58fa56b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
MailObject.java
src/main/java/com/egolm/pds/bean/MailObject.java
+20
-2
EmailService.java
src/main/java/com/egolm/pds/service/EmailService.java
+3
-3
No files found.
src/main/java/com/egolm/pds/bean/MailObject.java
View file @
3fce14a9
package
com
.
egolm
.
pds
.
bean
;
package
com
.
egolm
.
pds
.
bean
;
public
class
MailObject
{
public
class
MailObject
{
public
String
subject
;
public
String
content
;
private
String
subject
;
private
String
content
;
public
String
getSubject
()
{
return
subject
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setSubject
(
String
subject
)
{
this
.
subject
=
subject
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
}
}
src/main/java/com/egolm/pds/service/EmailService.java
View file @
3fce14a9
...
@@ -28,8 +28,8 @@ public class EmailService {
...
@@ -28,8 +28,8 @@ public class EmailService {
StringBuffer
stackString
=
ThrowableUtil
.
toStackString
(
e
);
StringBuffer
stackString
=
ThrowableUtil
.
toStackString
(
e
);
String
timeString
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
);
String
timeString
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
);
MailObject
emailObject
=
new
MailObject
();
MailObject
emailObject
=
new
MailObject
();
emailObject
.
s
ubject
=
subject
;
emailObject
.
s
etSubject
(
subject
)
;
emailObject
.
content
=
timeString
+
"\r\n"
+
subject
+
"\r\n"
+
content
+
"\r\n"
+
stackString
.
toString
(
);
emailObject
.
setContent
(
timeString
+
"\r\n"
+
subject
+
"\r\n"
+
content
+
"\r\n"
+
stackString
.
toString
()
);
queue
.
add
(
emailObject
);
queue
.
add
(
emailObject
);
}
}
...
@@ -39,7 +39,7 @@ public class EmailService {
...
@@ -39,7 +39,7 @@ public class EmailService {
MailObject
obj
=
null
;
MailObject
obj
=
null
;
try
{
try
{
obj
=
queue
.
take
();
obj
=
queue
.
take
();
this
.
sendForsync
(
obj
.
subject
,
obj
.
content
);
this
.
sendForsync
(
obj
.
getSubject
(),
obj
.
getContent
()
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
log
.
error
(
""
,
e
);
log
.
error
(
""
,
e
);
if
(
obj
!=
null
)
{
if
(
obj
!=
null
)
{
...
...
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