Skip to content
Snippets Groups Projects
Commit c710dddf authored by rswindell's avatar rswindell
Browse files

Fix bug introduced in previous commit as reported by Nelgin:

to and from extension header fields were being set (for the mail base) even
when the to or from name was not a valid local user name (thus an extension
value of "0" was being stored in the header) - causing netmail imported with
postmsg.js to never get exported.
parent bc236ce1
Branches
Tags
No related merge requests found
......@@ -124,10 +124,11 @@ if(!hdrs.from)
hdrs.from = prompt("From User name");
if(!hdrs.subject)
hdrs.subject = prompt("Subject");
if(!hdrs.to_ext && sub_code == 'mail')
hdrs.to_ext = system.matchuser(hdrs.to);
if(!hdrs.from_ext)
hdrs.from_ext = system.matchuser(hdrs.from);
var num;
if(!hdrs.to_ext && sub_code == 'mail' && (num = system.matchuser(hdrs.to)) != 0)
hdrs.to_ext = num;
if(!hdrs.from_ext && (num = system.matchuser(hdrs.from)) != 0)
hdrs.from_ext = num;
if(!msgbase.save_msg(hdrs, body)) {
alert("Error saving message: " + msgbase.last_error);
exit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment