-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support send email with SMTPSSLTransport #5018
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5018 +/- ##
============================================
+ Coverage 49.27% 49.48% +0.20%
- Complexity 1889 1902 +13
============================================
Files 372 372
Lines 11538 11564 +26
Branches 1123 1129 +6
============================================
+ Hits 5685 5722 +37
+ Misses 5513 5502 -11
Partials 340 340 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a new feature, please also update the CHANGES.md file.
...tal/src/main/java/com/ctrip/framework/apollo/portal/spi/defaultimpl/DefaultEmailService.java
Outdated
Show resolved
Hide resolved
By the way, please sign the Contributor License Agreement (CLA) as instructed by the CLA Assistant. |
Signed-off-by: victorquan <[email protected]>
d3d338e
to
8fe3b1c
Compare
I have read the CLA Document and I hereby sign the CLA |
Signed-off-by: victorquan <[email protected]>
msg.saveChanges(); | ||
t.sendMessage(msg, msg.getAllRecipients()); | ||
logger.debug("email response: {}", t.getLastServerResponse()); | ||
if (useSsl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like unnecessary to declare a new variable tSsl
. Could we consider streamlining the code even further, as suggested below?
String protocol = useSSl ? "smtps" : "smtp";
t = (SMTPTransport) session.getTransport(protocol);
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
接入邮件服务发现只支持smtp(25端口),不支持smtps(465端口),估计可能会有一些使用者遇到类似的问题,故提个PR增加支持ssl方式,代码写得有点粗糙,希望该意见能得到采纳,感谢不吝赐教。
What's the purpose of this PR
XXXXX
Which issue(s) this PR fixes:
Fixes #
Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.