I have written a script that will send out a weekly updated via E-Mail using Mail::Internet; it works fine except that I get the following output:
Net::SMTP: Bad hostname 'mailhost' at blib/lib/Mail/Internet.pm (autos +plit into blib/lib/auto/Mail/Internet/smtpsend.al) line 577 Net::SMTP: Bad hostname 'mailhost' at blib/lib/Mail/Util.pm (autosplit + into blib/lib/auto/Mail/Util/maildomain.al) line 176
It appears that this is a warning only -- the E-Mail arrives properly, but I would like to see if there is a way to resolve the problem, since my preferred operation is without warnings.

I have search on PM and on Google: I tried substituting 'localhost' in the my $Message = Mail::Internet->new(); call, and that got rid of the warning from Net::SMTP but instead I got the message Can't use string ("localhost") as a symbol ref while "strict refs" in use at /usr/lib/perl5/Mail/Internet.pm line 68. --t. alex

"Here's the chocolates, and here's the flowers. Now how 'bout it, widder hen, will ya marry me?" --Foghorn Leghorn


In reply to Bad hostname 'mailhost' by talexb

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.