rovf has asked for the wisdom of the Perl Monks concerning the following question:

Just out of curiosity (since this is not a blocking point for us), but maybe someone has experienced this before:

We are using Mail::SendEasy to send mail from our application (Windows environment), which worked fine so far. By chance I found out that, if I use the module from the Windows command line, i.e. perl -we "use strict; use Mail::SendEasy;...", sending mail always fails and we get the error message

MAIL FROM error (500 .....: unknown command.)
If I put exactly the same Perl expression into a file and execute with perl -w myfile.pl, it works.

I now just would like to ask if someone, by chance, already has had a similar experience on Windows, or has some idea where this difference in behaviour comes from. Please - I do NOT want you to spend much time for thinking about this question! As I said, it is not so urgent (we don't intent to send mail "from the command line"), and if it needs to be done, I can always put together some "minimal example program" and put some additional logging into Mail::SendEasy to trace what is going on.
-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re: Send Mail works from Program, not from Windows command line
by wfsp (Abbot) on Nov 27, 2009 at 15:29 UTC

      Thanks - typo corrected!

      -- 
      Ronald Fischer <ynnor@mm.st>
Re: Send Mail works from Program, not from Windows command line
by LanX (Saint) on Nov 29, 2009 at 02:07 UTC
    Maybe quoting problems in the windows cmd shell?

    What happens if you try the same call from within another script, e.g. with backticks?

    Cheers Rolf

      Maybe quoting problems in the windows cmd shell?
      Hmmm... I've put the command into "..." quotes, so there shouldn't be something interpreted inside, doesn't it? BTW, if I would run it from another Perl program using backticks, the quoting problem would be the same, because the cmd shell would be involved too.

      -- 
      Ronald Fischer <ynnor@mm.st>