FAQ
All,
Perl newbie here. I am looking for help on how to send emails form
a Windows XP platform using Perl 5.8.8. I have tried different codes
and must be doing something wrong. Any thoughts or help would be
appreciated.

Search Discussions

  • Jeff Pang at Oct 22, 2007 at 11:52 am
    There're lots of modules for sending mail on CPAN.like:

    Mail::Sender
    Email::Send
    MIME::Lite
    Net::SMTP
    ...

    which method do you use and what error message did you get?
    On 10/22/07, johnnyp wrote:
    All,
    Perl newbie here. I am looking for help on how to send emails form
    a Windows XP platform using Perl 5.8.8. I have tried different codes
    and must be doing something wrong. Any thoughts or help would be
    appreciated.


    --
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
    http://learn.perl.org/

  • Johnnyp at Oct 23, 2007 at 8:45 am

    On Oct 22, 6:52 am, [email protected] (Jeff Pang) wrote:
    There're lots of modules for sending mail on CPAN.like:

    Mail::Sender
    Email::Send
    MIME::Lite
    Net::SMTP
    ...

    which method do you use and what error message did you get?

    On 10/22/07, johnnyp wrote:


    All,
    Perl newbie here. I am looking for help on how to send emails form
    a Windows XP platform using Perl 5.8.8. I have tried different codes
    and must be doing something wrong. Any thoughts or help would be
    appreciated.
    --
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
    http://learn.perl.org/- Hide quoted text -
    - Show quoted text -
    Yes including code and errors would have been more helpful on my
    part. I am attempting to use Mail::SendMail with the following code:

    #!C:\Perl\lib\mail

    use strict;
    use warnings;
    use Mail::SendMail;


    my %mail = ( To => '[email protected]',
    From => '[email protected]',
    Message => "test mail"
    );

    sendmail(%mail) or die $Mail::Sendmail::error;

    print "OK. Log says:\n", $Mail::Sendmail::log;

    __END__

    The error I am getting is:
    'undefined subroutine &main::sendmail called at C:perl\lib\mail
    \mail.pl line 13.

    As best I can tell this error is actually popping up from the
    sendmail.pm subroutine sub sendmail. But I could be mistaken.
  • Gunnar Hjalmarsson at Oct 23, 2007 at 11:01 am

    johnnyp wrote:
    I am attempting to use Mail::SendMail with the following code:

    #!C:\Perl\lib\mail

    use strict;
    use warnings;
    use Mail::SendMail;
    ----------------^
    Case matters, even if you are on Windows.
    my %mail = ( To => '[email protected]',
    From => '[email protected]',
    Message => "test mail"
    );

    sendmail(%mail) or die $Mail::Sendmail::error;

    print "OK. Log says:\n", $Mail::Sendmail::log;

    __END__

    The error I am getting is:
    'undefined subroutine &main::sendmail called at C:perl\lib\mail
    \mail.pl line 13.

    As best I can tell this error is actually popping up from the
    sendmail.pm subroutine sub sendmail. But I could be mistaken.
    You are; see my remark above.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
  • Jenda Krynicky at Oct 23, 2007 at 11:04 am
    From: johnnyp <[email protected]>
    Yes including code and errors would have been more helpful on my
    part. I am attempting to use Mail::SendMail with the following code:

    #!C:\Perl\lib\mail

    use strict;
    use warnings;
    use Mail::SendMail;


    my %mail = ( To => '[email protected]',
    From => '[email protected]',
    Message => "test mail"
    );

    sendmail(%mail) or die $Mail::Sendmail::error;

    print "OK. Log says:\n", $Mail::Sendmail::log;

    __END__

    The error I am getting is:
    'undefined subroutine &main::sendmail called at C:perl\lib\mail
    \mail.pl line 13.
    The module is named Mail::Sendmail ! Notice the lowercase "m" in the
    middle of "Sendmail". Perl is case sensitive even if the underlying
    filesystem is not. (I do wish Perl emited a warning in such cases.)

    Perl is able to find and load the ...\Mail\SendMail.pm (because the
    Windows filesystem doesn't care whether you ask it for Sendmail.pm,
    SendMail.pm or SENDMAIL.PM), but fails to initialize it properly ...
    it tries to initialize module Mail::SendMail, but there is only
    Mail::Sendmail in the file.

    Jenda
    ===== [email protected] === http://Jenda.Krynicky.cz =====
    When it comes to wine, women and song, wizards are allowed
    to get drunk and croon as much as they like.
    -- Terry Pratchett in Sourcery

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbeginners @
categoriesperl
postedOct 22, '07 at 9:56a
activeOct 23, '07 at 11:04a
posts5
users4
websiteperl.org

People

Translate

site design / logo © 2023 Grokbase