Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
a3575b3e
Commit
a3575b3e
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
when smtp server is not configured, we are not trying to send email
parent
fe45cf5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!67
Resolve "Clicking on map with private comments might produce an error"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
service/src/main/java/lcsb/mapviewer/services/utils/EmailSender.java
+11
-7
11 additions, 7 deletions
.../main/java/lcsb/mapviewer/services/utils/EmailSender.java
with
11 additions
and
7 deletions
service/src/main/java/lcsb/mapviewer/services/utils/EmailSender.java
+
11
−
7
View file @
a3575b3e
...
...
@@ -32,33 +32,33 @@ public class EmailSender {
/**
* Default class logger.
*/
private
Logger
logger
=
Logger
.
getLogger
(
EmailSender
.
class
);
private
Logger
logger
=
Logger
.
getLogger
(
EmailSender
.
class
);
/**
* String (usualy email address) that should appear in sender field of the
* email.
*/
private
String
sender
;
private
String
sender
;
/**
* Login used for accessing mail account.
*/
private
String
login
;
private
String
login
;
/**
* Password used for accessing mail account.
*/
private
String
password
;
private
String
password
;
/**
* Server used for smtp.
*/
private
String
smtpHost
;
private
String
smtpHost
;
/**
* Port on the server used by imap.
*/
private
String
imapHost
;
private
String
imapHost
;
/**
* Port on the server used by smtp.
*/
private
String
smtpPort
;
private
String
smtpPort
;
/**
* Default constructor that initializes data.
...
...
@@ -141,6 +141,10 @@ public class EmailSender {
* thrown when there is a problem with sending email
*/
public
void
sendEmail
(
List
<
String
>
recipients
,
List
<
String
>
ccRecipients
,
String
subject
,
String
message
)
throws
MessagingException
{
if
(
smtpHost
.
equals
(
ConfigurationElementType
.
EMAIL_SMTP_SERVER
.
getDefaultValue
()))
{
logger
.
warn
(
"Cannot send email. No smpt server defined"
);
return
;
}
// set data of the mail account
Properties
props
=
System
.
getProperties
();
...
...
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