Branch: Tag:

2001-07-18

2001-07-18 08:07:11 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

adding code to allow use of an already connected server

Rev: lib/modules/Protocols.pmod/SMTP.pmod:1.15

52:    return r;    }    -  void create(void|string server, int|void port) +  void create(void|string|Stdio.File server, int|void port)    {    if(!server)    {
61:    server=dns->get_primary_mx(gethostname());    }    +  werror("server=%O\n",server); +  if (objectp(server)) +  assign(server); +  else +  {    if(!port)    port = 25;   
68:    {    throw(({"Failed to connect to mail server.\n",backtrace()}));    } +  }       if(readreturncode()/100 != 2)    throw(({"Connection refused by SMTP server.\n",backtrace()}));