Hey all, I'm using the Mail::Sender module in a program that i wrote to make changes to some acl files and atumatically mail the affected users through smtp. The program is almost working except for the actual mailing. When I run the program, I make my file changes, and from there the Mail::Sender module takes over. I got no mail though. When I check my syslog, I see the following:
Jun 26 10:11:22 huma sendmail[2348]: f5QEBMv02348: lost input channel +from local host [127.0.0.1] to Daemon0 after data Jun 26 10:11:22 huma sendmail[2348]: f5QEBMv02348: from=<nobody.domain +.com>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=Daemon0, relay=localhos +t [127.0.0 .1]
Here is my sub that handles the actual mailing:
sub sender_mail { no strict "refs"; my ($user1,$diff1) = @_; my $body_file = "/usr/local/squid/etc/aclfiles/letter"; open (BODY_FILE,$body_file); my @body = <BODY_FILE>; close (BODY_FILE); my $from = "nobody.domain.com"; my $subj = "Web access changes."; my $sender; ($sender = new Mail::Sender ({ from => $from, smtp => 'localhost'})) || die "$!"; ($sender->MailFile( { to => $user1, subject => $subj, msg => "@body", file => $dif +f1 })) }
If you need to see the rest of the code, let me know. I would greatly appreciate any help anyone can give to me on this one. Thanks in advance, Bradley
Where ever there is confusion to be had... I'll be there.

In reply to Mail::Sender question by Dalin

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.