pike.git / lib / modules / Protocols.pmod / SMTP.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/SMTP.pmod:42:    "[E.g., mailbox syntax incorrect or relaying denied]",    554:"Transaction failed" ]);       static private int cmd(string c, string|void comment)    {    int r = command(c);    switch(r) {    case 200..399:    break;    default: -  throw(({"SMTP: "+c+"\n"+(comment?"SMTP: "+comment+"\n":"")+ -  "SMTP: "+reply_codes[r]+"\n", backtrace()})); +  error( "SMTP: "+c+"\n"+(comment?"SMTP: "+comment+"\n":"")+ +  "SMTP: "+reply_codes[r]+"\n" );    }    return r;    }       //! @decl void create()    //! @decl void create(Stdio.File server)    //! @decl void create(string server, void|int port)    //! Creates an SMTP mail client and connects it to the    //! the @[server] provided. The server parameter may    //! either be a string witht the hostnam of the mail server,
pike.git/lib/modules/Protocols.pmod/SMTP.pmod:82:       if (objectp(server))    assign(server);    else    {    if(!port)    port = 25;       if(!server || !connect(server, port))    { -  throw(({"Failed to connect to mail server.\n",backtrace()})); +  error("Failed to connect to mail server.\n");    }    }       if(readreturncode()/100 != 2) -  throw(({"Connection refused by SMTP server.\n",backtrace()})); +  error("Connection refused by SMTP server.\n");       if(catch(cmd("EHLO "+gethostname())))    cmd("HELO "+gethostname(), "greeting failed.");    }       //! Sends a mail message from @[from] to the mail addresses    //! listed in @[to] with the mail body @[body]. The body    //! should be a correctly formatted mail DATA block, e.g.    //! produced by @[MIME.Message].    //!