Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

RE: : A module to send an email without your ISP's mailserver

by merlyn (Sage)
on Jul 28, 2000 at 18:33 UTC ( #24853=note: print w/replies, xml ) Need Help??

in reply to : A module to send an email without your ISP's mailserver

This seems to be a repeat of what Net::SMTP can already do. Can you distinguish it a bit better?

-- Randal L. Schwartz, Perl hacker

  • Comment on RE: : A module to send an email without your ISP's mailserver

Replies are listed 'Best First'.
RE: RE: : A module to send an email without your ISP's mailserver
by gaggio (Friar) on Jul 28, 2000 at 19:05 UTC
    You are right, I forgot to mention that there was Net::SMTP also. I actually used Net::SMTP, but had problems with it. It might be because I was on a Win32 machine? I don't know. All I know was that it would not send email the way does. I also tried their example of running an SMTP server, but it did not work either :-)

    I decided that I would write my own, then, this is as simple as that. is very simple (a lot simpler than Net::SMTP), and does the job on Win32 machines (I did not test it on *nix platforms, but it should be pretty slick there also).

      I've had nothing but success using Net::SMTP under Perl 5.005_03 under Windows NT.

      I would like to point out that while endeavoring to learn the intricacies of SMTP is a Good Thing, there are a number of quirky SMTP servers in the world. Net::SMTP knows about most of them, and is a tried and trusted module. Be aware that it's quite likely you'll run into one of these servers sooner or later. And knowing the Murphy effect, it'll be the first time a user tries to use your module... (happens to me all the time!)


      e-mail jcwren
        Right. It'd be better to figure out if what's "wrong" with Net::SMTP is a bug in your understanding or a bug in the module. And if it's a bug in the module, fix it there, rather than write your own one-off code.

        Do not reinvent the wheel, unless you thoroughly understand the concept of wheel-ness.

        -- Randal L. Schwartz, Perl hacker

        OK. Could you give me the same example code as mine, using Net::SMTP, then?

        I would like to see that.

        Update: jcwren pointed me to this node, for an example of Net::SMTP, but I see that there is an email server to specify, whereas there is none in my example script. I'm still waiting...

        Update2: jcwren says that the email server to specify is the text after the @ symbol in the target email address. I tried it: it does not work. I can't believe people saying that what I wrote is useless when they can't prove it!
      If you "had problems", what were they? And were you using the latest ActiveState Perl?

      -- Randal L. Schwartz, Perl hacker

      update: OK, as feedback for me, why was this voted down? I was genuinely curious about the unspecified problems, since I'm using Net::SMTP in programs I write. Should I have remained uninformed?

      Or is this just a backlash fallout from the other posts of the past few days?

        The program was hanging. Not giving any information, and not sending the email like expected - I did not try to debug the problem too much, since I wanted to learn about the feature by myself also - which I did pretty well I guess. Now, here, I'm not trying to claim that people should use my module if they are fine with Net::SMTP, I'm just sharing a piece of code as a little teaching.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://24853]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2018-07-19 15:46 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (411 votes). Check out past polls.