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
No related branches found
No related tags found
No related merge requests found
...@@ -124,10 +124,11 @@ if(!hdrs.from) ...@@ -124,10 +124,11 @@ if(!hdrs.from)
hdrs.from = prompt("From User name"); hdrs.from = prompt("From User name");
if(!hdrs.subject) if(!hdrs.subject)
hdrs.subject = prompt("Subject"); hdrs.subject = prompt("Subject");
if(!hdrs.to_ext && sub_code == 'mail') var num;
hdrs.to_ext = system.matchuser(hdrs.to); if(!hdrs.to_ext && sub_code == 'mail' && (num = system.matchuser(hdrs.to)) != 0)
if(!hdrs.from_ext) hdrs.to_ext = num;
hdrs.from_ext = system.matchuser(hdrs.from); if(!hdrs.from_ext && (num = system.matchuser(hdrs.from)) != 0)
hdrs.from_ext = num;
if(!msgbase.save_msg(hdrs, body)) { if(!msgbase.save_msg(hdrs, body)) {
alert("Error saving message: " + msgbase.last_error); alert("Error saving message: " + msgbase.last_error);
exit(); exit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment