Skip to content
Snippets Groups Projects
Commit 1dde501f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Call add_msg_id() *after* opening the message base to send notification email

notify() was creating wrongly-formated auto-generated Message-IDs:
e.g. Message-ID: <677B3F17.0.notices@vert.synchro.net>
parent a535dd36
Branches
Tags
No related merge requests found
......@@ -704,8 +704,8 @@ extern "C" int notify(scfg_t* cfg, uint usernumber, const char* subject, const c
char* msgsubj = strip_ctrl(subject, NULL);
smb_hfield_str(&msg, SUBJECT, msgsubj);
free(msgsubj);
add_msg_ids(cfg, &smb, &msg, /* remsg: */NULL);
if(msgbase_open(cfg, &smb, INVALID_SUB, &storage, &dupechk_hashes, &xlat) == SMB_SUCCESS) {
add_msg_ids(cfg, &smb, &msg, /* remsg: */NULL);
smb_addmsg(&smb, &msg, storage, dupechk_hashes, xlat, (uchar*)text, /* tail: */NULL);
smb_close(&smb);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment