Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Well, I could have probably posted this in the Code Catacombs section, but I do think that it is also a Cool Use for Perl, even a small revelation for some people...

Indeed, there were mail sending modules available (Mail::Mailer, Net::SMTP, etc.), and there was the mail program forking method (e.g. open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq"), etc.). Those methods are not as simple as sending an email could be, because you need to have a mailserver to route your email through the Internet (I am not even talking about the Win32 case, where you need to get some sort of sendmail replacement to work along with those modules...).

Well, maybe that is for you, then, since the only thing it requires is to have an Internet connection, which you have obviously since you are reading this :-)

I can see already some people coming and telling me that it is not "the holiest way" to send email, because the netiquette or "net moral policy" forbids it. Well, first, I am not the only one to send email like this (have a look here, for example, where you can download and use for FREE an application to send your email directly to your target email address from a Microsoft platform). Second, I don't understand why sending emails that way would perturb in any way the way the Internet is working. I think that no harm can be done by bypassing your ISP, when you can: it just makes the route of the emails shorter, in fact!

There is not lots of technology behind Ultimail. It simply uses a raw socket connection to talk directly to the server of the email receiver, after having fetched this server name in the DNS records.

Warning: Althoug I did not have any problem using the module myself, I do *not* guarantee that sending emails that way will work always. Simply because it is possible that some email servers would performs special checks during the communication. For example, if you want to send an email with a "From:" field claiming that you are "" - a fake email address for the sender - you might find your sending request denied.

So, here you are, excited about such possibilities, and want to use the module. How can you do that? - Easy. First, go to my homepage, follow the link to the Perl section, download the module, unzip it, and put it in your library directory. Note that to get the program to run, you will have to install the Net::DNS module. The Net::DNS Author can be found here. If you are on a Microsoft platform, you should download the latest development version, to avoid problems. Then, code! Here's a self explanatory example program:

#!/usr/local/bin/perl -w use Ultimail; my $um = Ultimail->new; $um->mailto('Larry Wall <>'); $um->mailfrom('Me <>'); $um->subject("The beauty of"); $um->body(" is one of the most beautiful creation of all +time (after Perl itself, of course :-)."); $um->send;

There are other features in the module, like the possibility to display the communication, with the verbose() method, or the possibility to give a "ReplyTo" email address different from the sending address, but I leave this undocumented here, to keep it simple: just read the code by yourself! does not support Attachments, yet. Feel free to add the feature to the module, if you want - you will certainly need to use an encoding library. But in this case, please email me: I'd be glad to see your improvements in action!

In reply to : A module to send an email without your ISP's mailserver by gaggio

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (4)
    As of 2018-07-21 23:39 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 (450 votes). Check out past polls.