projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b7bd04
)
Speculative fix for sending KDM emails via port 465.
author
Carl Hetherington
<cth@carlh.net>
Sun, 2 Oct 2016 23:57:56 +0000
(
00:57
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 2 Oct 2016 23:57:56 +0000
(
00:57
+0100)
src/lib/emailer.cc
patch
|
blob
|
history
diff --git
a/src/lib/emailer.cc
b/src/lib/emailer.cc
index ceb26caf6ae15e12ea1c42cb93e1d9e358812647..fe6eb529428b32b90a5275c3b472bc8e87f2762a 100644
(file)
--- a/
src/lib/emailer.cc
+++ b/
src/lib/emailer.cc
@@
-177,7
+177,12
@@
Emailer::send (string server, int port, string user, string password)
throw NetworkError ("Could not initialise libcurl");
}
throw NetworkError ("Could not initialise libcurl");
}
- curl_easy_setopt (curl, CURLOPT_URL, String::compose ("smtp://%1:%2", server.c_str(), port).c_str());
+ if (port == 465) {
+ /* "Implicit TLS"; I think curl wants us to use smtps here */
+ curl_easy_setopt (curl, CURLOPT_URL, String::compose ("smtps://%1:465", server).c_str());
+ } else {
+ curl_easy_setopt (curl, CURLOPT_URL, String::compose ("smtp://%1:%2", server, port).c_str());
+ }
if (!user.empty ()) {
curl_easy_setopt (curl, CURLOPT_USERNAME, user.c_str ());
if (!user.empty ()) {
curl_easy_setopt (curl, CURLOPT_USERNAME, user.c_str ());