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

Moved sendmail.js rcpt() to parse_mail_recipient() here for reuse

parent 602a2d0e
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,6 @@
// Parses Internet mail and USENET article header fields
// for use with newsutil.js and mailproc_util.js
// $Id: mailutil.js,v 1.3 2016/08/12 22:15:02 rswindell Exp $
//Michael J. Ryan - 2004-04-16 - tracker1(at)theroughnecks.net
// gets the name portion for the "to/from"
function mail_get_name(strIn) {
......@@ -29,6 +27,17 @@ function mail_get_address(strIn) {
return null;
}
function parse_mail_recipient(str)
{
var hdr = {
to: mail_get_name(str),
to_net_addr: mail_get_address(str)
};
if(netaddr_type(str) == NET_NONE)
hdr.to_ext = 1; // TODO: look up alias?
return hdr;
}
function fidoaddr_to_emailaddr(name, addr, tld)
{
var ftn;
......
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