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

Improved from: header field representation for networked messages.

parent 3d782ae9
No related branches found
No related tags found
No related merge requests found
......@@ -369,14 +369,22 @@ while(client.socket.is_connected) {
break;
if(cmd[0].toUpperCase()!="BODY") {
if(hdr.from_net_type)
if(!hdr.from_net_type) /* local message */
writeln(format("From: \"%s\" <%s@%s>"
,hdr.from,hdr.from,hdr.from_net_addr));
,hdr.from
,hdr.from.replace(/ /g,"_")
,system.inetaddr));
else if(!hdr.from_net_addr.length)
writeln(format("From: %s",hdr.from));
else if(hdr.from_net_addr.indexOf('@')!=-1)
writeln(format("From: \"%s\" <%s>"
,hdr.from
,hdr.from_net_addr));
else
writeln(format("From: \"%s\" <%s@%s>"
,hdr.from
,hdr.from.replace(/ /g,"_")
,system.inetaddr));
,hdr.from_net_addr));
writeln("To: " + hdr.to);
writeln("X-Comment-To: " + hdr.to);
writeln("Subject: " + hdr.subject);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment