diff options
| author | 2025-04-28 06:16:17 +0200 | |
|---|---|---|
| committer | 2025-04-28 06:16:17 +0200 | |
| commit | 974b9ab69560fe8b0520ba5ddc330d1697577185 (patch) | |
| tree | f040f3f455913d7b8a9b951c28004f231550100d | |
| parent | Updated documentation. (diff) | |
| parent | Changed email notifications: use SMTP only if configured. (diff) | |
| download | penes-snac2-974b9ab69560fe8b0520ba5ddc330d1697577185.tar.gz penes-snac2-974b9ab69560fe8b0520ba5ddc330d1697577185.tar.xz penes-snac2-974b9ab69560fe8b0520ba5ddc330d1697577185.zip | |
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) | |||
| 2570 | int send_email(const xs_dict *mailinfo) | 2570 | int send_email(const xs_dict *mailinfo) |
| 2571 | /* invoke curl */ | 2571 | /* invoke curl */ |
| 2572 | { | 2572 | { |
| 2573 | if (xs_is_true(xs_dict_get(srv_config, "spawn_sendmail"))) { | 2573 | const char *url = xs_dict_get(srv_config, "smtp_url"); |
| 2574 | |||
| 2575 | if (!xs_is_string(url) || *url == '\0') { | ||
| 2576 | /* revert back to old sendmail pipe behaviour */ | ||
| 2574 | const char *msg = xs_dict_get(mailinfo, "body"); | 2577 | const char *msg = xs_dict_get(mailinfo, "body"); |
| 2575 | FILE *f; | 2578 | FILE *f; |
| 2576 | int status; | 2579 | int status; |
| @@ -2599,7 +2602,6 @@ int send_email(const xs_dict *mailinfo) | |||
| 2599 | } | 2602 | } |
| 2600 | 2603 | ||
| 2601 | const char | 2604 | const char |
| 2602 | *url = xs_dict_get(srv_config, "smtp_url"), | ||
| 2603 | *user = xs_dict_get(srv_config, "smtp_username"), | 2605 | *user = xs_dict_get(srv_config, "smtp_username"), |
| 2604 | *pass = xs_dict_get(srv_config, "smtp_password"), | 2606 | *pass = xs_dict_get(srv_config, "smtp_password"), |
| 2605 | *from = xs_dict_get(mailinfo, "from"), | 2607 | *from = xs_dict_get(mailinfo, "from"), |