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

So i'm working (playing?) on this little side project of mine with my spare brain-cpu spins. It's a Microsoft 2k(rap) SMTP server i'm trying to do this to, if that means anything. It all seems to run fine, and the mail gets queued even, but I see nothing in my inbox. Usernames have been changed to protect the less than innocent.
<my first code ever> #!/usr/bin/perl $smtp = Net::SMTP->new("mailserver", Debug => 1, ); $smtp->mail($ENV{"user1"}); $smtp->recipient("user2"); $smtp->data(); $smtp->datasend("\n"); $smtp->datasend("Testes. 1... 2... uh, 3...\n"); $smtp->dataend(); $smtp->quit; </my first code ever>
Any wisdom to be had?
-><-

Edit kudra, 2001-10-30 Changed title

Replies are listed 'Best First'.
Re: It's my first time, be gentle.
by Ahbeyra (Monk) on Oct 26, 2001 at 01:36 UTC
    Well, since this is perl, there is always another way to do it, you can try something like:
    use Mail::Sendmail; %mail = ( To => 'someone@somewhere.moo', From => 'me@here.mootoo', Message => "mommy says chocolate milk is from brown cows and + strawberry is from red ones." ); if (sendmail %mail) { print "Yay. It worked.\n" } else { print "DOH!: $Mail::Sendmail::error \n" }
    well, i just prefer this method over Net::SMTP... so thats my two cents.

    -------------------------
    I love the smell of pastures in the morning... /tell ahbeyra moo
(bbfu) (Net::SMTP problems: recipient?) Re: It's my first time, be gentle.
by bbfu (Curate) on Oct 26, 2001 at 01:09 UTC

    Perhaps when you said:

    $smtp->recipient("user2");

    You really meant:

    $smtp->recipient($ENV{"user2"});

    As that seems to be what you did with "user1"?

    bbfu
    Seasons don't fear The Reaper.
    Nor do the wind, the sun, and the rain.
    We can be like they are.

A reply falls below the community's threshold of quality. You may see it by logging in.