summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar shtrophic2025-01-24 22:24:05 +0100
committerGravatar shtrophic2025-01-24 22:24:05 +0100
commit3d96c576287736ebdf87e4a7b956842a6c6e055f (patch)
treead5f4cc5ebc9913ccfd753edfc934b82e34be72e /activitypub.c
parentadd tests subdirectory with makefile target (diff)
downloadsnac2-3d96c576287736ebdf87e4a7b956842a6c6e055f.tar.gz
snac2-3d96c576287736ebdf87e4a7b956842a6c6e055f.tar.xz
snac2-3d96c576287736ebdf87e4a7b956842a6c6e055f.zip
enforce tls when supported && add tests
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 4cb779a..f3b2bae 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -2538,8 +2538,9 @@ int send_email(const xs_dict *mailinfo)
2538 *from = xs_dict_get(mailinfo, "from"), 2538 *from = xs_dict_get(mailinfo, "from"),
2539 *to = xs_dict_get(mailinfo, "to"), 2539 *to = xs_dict_get(mailinfo, "to"),
2540 *body = xs_dict_get(mailinfo, "body"); 2540 *body = xs_dict_get(mailinfo, "body");
2541 int smtp_port = parse_port(url, NULL);
2541 2542
2542 return xs_smtp_request(url, user, pass, from, to, body); 2543 return xs_smtp_request(url, user, pass, from, to, body, smtp_port == 465 || smtp_port == 587);
2543} 2544}
2544 2545
2545 2546