diff options
| author | grunfink <grunfink@comam.es> | 2025-04-28 06:16:17 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-04-28 06:16:17 +0200 |
| commit | 974b9ab69560fe8b0520ba5ddc330d1697577185 (patch) | |
| tree | f040f3f455913d7b8a9b951c28004f231550100d | |
| parent | d33891bab58d50f469dc79d9182f079fcb8bd026 (diff) | |
| parent | 8e467684c2d6960d64af9ea3de74ddb30d82302f (diff) | |
Merge branch 'master' of /home/angel/git/snac2
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index 92e408b..98ed6da 100644 --- a/activitypub.c +++ b/activitypub.c @@ -2570,7 +2570,10 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) int send_email(const xs_dict *mailinfo) /* invoke curl */ { - if (xs_is_true(xs_dict_get(srv_config, "spawn_sendmail"))) { + const char *url = xs_dict_get(srv_config, "smtp_url"); + + if (!xs_is_string(url) || *url == '\0') { + /* revert back to old sendmail pipe behaviour */ const char *msg = xs_dict_get(mailinfo, "body"); FILE *f; int status; @@ -2599,7 +2602,6 @@ int send_email(const xs_dict *mailinfo) } const char - *url = xs_dict_get(srv_config, "smtp_url"), *user = xs_dict_get(srv_config, "smtp_username"), *pass = xs_dict_get(srv_config, "smtp_password"), *from = xs_dict_get(mailinfo, "from"), |