You'll find that you get more out of these forums by giving smaller examples of working code and building up from there. This one is simply hard on the eyes and does not avail itself of the use strict; and use warnings; pragmas (pragmata?), which can make the gurus grumpy, as it inhibits their ability to divine what's going on with your situation. I stripped this down to bare bones just to see what I'd get:

$ perl mail1.pl No real MTA found, using 'testfile' at /usr/local/share/perl/5.14.2/Ma +il/Mailer.pm line 108. we arrived here mailer= Mail::Mailer::testfile=GLOB(0x91baf7c) Reminder= Feed Dino be +fore you go to the quarry. $

I don't know what an MTA is, but I'd imagine that the complaint centers around the e-mails being made up. I did, however, single-quote them, so that the @ sign wouldn't be interpolated, as happens with double-quoting.

use strict; use warnings; my $Reminder = "Feed Dino before you go to the quarry."; mail_reminder(); sub mail_reminder{ use Mail::Mailer; use strict; my $New_Reminder="Reminder"; my $From_address='fred@192.168.1.171'; my $To_address='barney@192.168.1.171'; my $mailer = Mail::Mailer->new(); $mailer->open({ From =>$From_address, To =>$To_address, Subject =>$New_Reminder, }); print $mailer $Reminder; print "we arrived here\n"; print "mailer= ",$mailer," Reminder= ",$Reminder,"\n"; $mailer->close() or die "Can't send: $!\n"; }

Mail::Mailer keeps your abortive attempts in a file for you:

$ cat mailer.testfile === test 1 Wed Apr 22 12:16:00 2015 from: twain@twain-desktop to: barney@192.168.1.171 Subject: Reminder To: barney@192.168.1.171 From: fred@192.168.1.171 Feed Dino before you go to the quarry.$

Ultimately, I decided that this is not how I communicate in this day and age. Of the many things perl does, I don't want it to be an e-mail client when thunderbird, facebook, and cell phone messaging are the alternative.


In reply to Re: Mail::Mailer and Thunderbird by Aldebaran
in thread Mail::Mailer and Thunderbird by rnj

Title:
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, details, 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, summary, 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.