in reply to Re: Re: Finding supported ESMTP Extensions with Net::SMTP
in thread Finding supported ESMTP Extensions with Net::SMTP

Hmm, depends on the definition of 'works' maybe :) Your solution doesn't result in any error or so, but it doesn't really test if the SMTP server supports DSN!

Did you try $smtpc->command('supports', 'DSN') with two SMTP servers, one which supports DSN and one that doesn't? I believe your approach wouldn't catch SMTP servers that do not support DSN. I believe Net::Cmd::command() is used to send protocol-level commands to the remote server.

However, checking if DSN is supported doesn't need interaction with the remote server. Upon creation of a Net::SMTP object, the object sends EHLO to the remote server and the remote server responds with the supported ESMTP extensions, which Net::SMTP stores in $self->{net_smtp_esmtp}. When called, Net::SMTP::supports() queries this hash.

Now you probably ask yourself, if this guy knows so much about this stuff, then why did he get stuck with the trivial defined. I think there is a point in that question... LOL

Replies are listed 'Best First'.
Re: Re: Re: Finding supported ESMTP Extensions with Net::SMTP
by Mr. Muskrat (Canon) on Jan 15, 2003 at 18:05 UTC
    D'oh! I feel really stupid now. I did indeed try it out with two different servers, one of which *should* support DSN. And you are correct, I was under the assumption that supports('DSN') should have been sent to the server.