Professional Web Applications Themes

Problem using Mailer - PERL Beginners

Hello, The below piece of code doesn't work for me. ------------ $sfile = $req_file; open(RF,"<$req_file"); chop(rflines=<RF>); close(RF); use lib "/remote/xx/yy/SCRIPTS/libnet-1.12/"; use lib "/remote/xx/yy/SCRIPTS/"; use Mail::Mailer; $mailer = Mail::Mailer->new("sendmail"); $mailer->open({From => 'COM', To => 'COM', }) or die "Can't open: $!\n"; print $mailer "rflines\n"; $mailer->close(); ----------------- I have "Mail" & "libnet-1.12" directories under /remote/xx/yy/SCRIPTS/libnet-1.12/. My libnet-1.12 directory has : ChangeLog Configure MANIFEST Net demos t Config.eg Hostname.pm.eg Makefile.PL README install-nomake My "Mail" directory has : ddress.pm Field Filter.pm Internet.pm Mailer.pm Util.pm Cap.pm Field.pm Header.pm Mailer Send.pm Thanks, Ravi...

  1. #1

    Default Problem using Mailer

    Hello,

    The below piece of code doesn't work for me.

    ------------

    $sfile = $req_file;
    open(RF,"<$req_file");
    chop(rflines=<RF>);
    close(RF);

    use lib "/remote/xx/yy/SCRIPTS/libnet-1.12/";
    use lib "/remote/xx/yy/SCRIPTS/";

    use Mail::Mailer;

    $mailer = Mail::Mailer->new("sendmail");
    $mailer->open({From => 'COM',
    To => 'COM',
    })
    or die "Can't open: $!\n";
    print $mailer "rflines\n";
    $mailer->close();

    -----------------

    I have "Mail" & "libnet-1.12" directories under
    /remote/xx/yy/SCRIPTS/libnet-1.12/.

    My libnet-1.12 directory has :

    ChangeLog Configure MANIFEST Net demos t
    Config.eg Hostname.pm.eg Makefile.PL README install-nomake

    My "Mail" directory has :

    ddress.pm Field Filter.pm Internet.pm Mailer.pm Util.pm
    Cap.pm Field.pm Header.pm Mailer Send.pm

    Thanks,
    Ravi




    T.S. Guest

  2. #2

    Default Re: Problem using Mailer



    T.S. RaviShankar wrote:
     

    1) add use strict and use warnings to the code
    2) then make the code strict and warnings safe
    3) then tell us specifically what you mean by "doesn't work for me"
    JupiterHost.Net Guest

  3. #3

    Default Re: Problem using Mailer

    Thanks for the reply.
    I did check with "use warnings" . I indeed got few warnings but none of
    them pertained to the piece of code I showed.
    The problem is that the code doesn't send any email as it is supposed to.
    What could have gone wrong if you don't see any problem with the code here ?

    Thanks again,
    Ravi


    JupiterHost.Net wrote:
     
    >
    >
    > 1) add use strict and use warnings to the code
    > 2) then make the code strict and warnings safe
    > 3) then tell us specifically what you mean by "doesn't work for me"
    >
    >[/ref]
    T.S. Guest

  4. #4

    Default Re: Problem using Mailer

    Ravi,
    What is the error msg being produced if any ??
    ----- Original Message -----
    From: "T.S. RaviShankar" <COM>
    Date: Monday, October 11, 2004 10:53 am
    Subject: Problem using Mailer
     

    mgoland@optonline.net Guest

Similar Threads

  1. SMTPsvg.Mailer HTML format problem
    By wrytat in forum ASP Components
    Replies: 2
    Last Post: December 15th, 09:30 AM
  2. form mailer
    By andrewdekker in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: May 17th, 11:19 AM
  3. PHP Mailer
    By simec in forum PHP Development
    Replies: 1
    Last Post: November 20th, 02:53 AM
  4. SQL Mailer Problem
    By Gerry in forum Microsoft SQL / MS SQL Server
    Replies: 3
    Last Post: August 7th, 04:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139