in reply to Mail::Mailer and Thunderbird

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.

Replies are listed 'Best First'.
Re^2: Mail::Mailer and Thunderbird
by afoken (Chancellor) on Apr 22, 2015 at 21:07 UTC
    I don't know what an MTA is

    Mail Transport Agent. That piece of software that makes your mail travel from one computer to the other. Something like exim or sendmail. MTAs talk SMTP on TCP port 25.

    The other abbreviations you frequently see in the context of mail handling are:

    MUA, Mail User Agent
    This is the software that lets you read and write mails. Thunderbird, in this case, or elm, pine, mail.
    MSA, Mail Submission Agent
    The software that accepts mails from the MUA and transfers it to the MTA. "Outgoing mail server". This function is often integrated with the MTA. Sendmail is (or once was) so dominant that many other MSAs and MTAs have a compatibility executable called sendmail that accepts sendmail most common options for submitting emails. MSAs talk SMTP on TCP port 587.
    MDA, Mail Delivery Agent
    The software that stuffs your mail into your mailbox. Typically procmail or maildrop, invoked by the final MTA.
    MRA, Mail Retrieval Agent
    Software that polls a remote mail server, fetches mails and either deliver the mails locally or re-submit it to a (local) mailserver. This is completely optional. Typical implementations are getmail and fetchmail.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)