Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] NET:SMTP Subject Method

Expand Messages
  • Jean-Sebastien Guay
    Leon, ... $smtp- datasend( Subject: $subject n ); # It s as simple as that! :-) ... J-S ... From: Leon To: win32 Cc: Yahoo Beginner Perl Sent: Friday, August
    Message 1 of 2 , Aug 1, 2003
    • 0 Attachment
      Leon,

      > ...
      > $smtp->datasend("From: $from\n");
      > $smtp->datasend("To: $to\n");
      $smtp->datasend("Subject: $subject\n"); # It's as simple as that! :-)
      > ...


      J-S

      ----- Original Message -----
      From: Leon
      To: win32
      Cc: Yahoo Beginner Perl
      Sent: Friday, August 01, 2003 9:45 AM
      Subject: [PBML] NET:SMTP Subject Method


      Hi everyone.

      First thanks for everyones help with the problems I
      was having with getting net:stmp to install. The
      person who suggested I install bundle-libnet (or maybe
      it was libnet-bundle) hit the nail on the head. This
      installed the net:smtp module.

      I have a script that looks like this:
      #Send E-mail for Critical Alerts

      #Here we define our parameters
      $to = 'test@...';
      $from = "Openview";
      $body = "Critical Alert";

      #Here we use the module $ pass parameters
      use Net::SMTP;

      $smtp = Net::SMTP->new('10.11.1.134');

      $smtp->mail($ENV{USER});
      $smtp->to($to);

      $smtp->data();
      $smtp->datasend("From: $from\n");
      $smtp->datasend("To: $to\n");
      $smtp->datasend("\n");
      $smtp->datasend("$body");
      $smtp->dataend();

      $smtp->quit;

      I copied most of it from the documentation but the
      documentation doesnt seem to specify how to create a
      subject field. Does anyone know how to do this? The
      link to the module page is right here.

      http://search.cpan.org/author/GBARR/libnet-1.16/Net/SMTP.pm

      Thx again,

      Leon


      __________________________________
      Do you Yahoo!?
      Yahoo! SiteBuilder - Free, easy-to-use web site design software
      http://sitebuilder.yahoo.com

      Yahoo! Groups Sponsor
      ADVERTISEMENT




      Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html

      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


      [Non-text portions of this message have been removed]
    • Rosenstein, Leon
      ... Hash: SHA1 You continue to rule! - -----Original Message----- From: Jean-Sebastien Guay [mailto:jean_seb@hybride.com] Sent: Friday, August 01, 2003 10:00
      Message 2 of 2 , Aug 1, 2003
      • 0 Attachment
        -----BEGIN PGP SIGNED MESSAGE-----
        Hash: SHA1

        You continue to rule!

        - -----Original Message-----
        From: Jean-Sebastien Guay [mailto:jean_seb@...]
        Sent: Friday, August 01, 2003 10:00 AM
        To: perl-beginner@yahoogroups.com
        Subject: Re: [PBML] NET:SMTP Subject Method

        Leon,

        > ...
        > $smtp->datasend("From: $from\n");
        > $smtp->datasend("To: $to\n");
        $smtp->datasend("Subject: $subject\n"); # It's as simple as that!
        :-)
        > ...


        J-S

        ----- Original Message -----
        From: Leon
        To: win32
        Cc: Yahoo Beginner Perl
        Sent: Friday, August 01, 2003 9:45 AM
        Subject: [PBML] NET:SMTP Subject Method


        Hi everyone.

        First thanks for everyones help with the problems I
        was having with getting net:stmp to install. The
        person who suggested I install bundle-libnet (or maybe
        it was libnet-bundle) hit the nail on the head. This
        installed the net:smtp module.

        I have a script that looks like this:
        #Send E-mail for Critical Alerts

        #Here we define our parameters
        $to = 'test@...';
        $from = "Openview";
        $body = "Critical Alert";

        #Here we use the module $ pass parameters
        use Net::SMTP;

        $smtp = Net::SMTP->new('10.11.1.134');

        $smtp->mail($ENV{USER});
        $smtp->to($to);

        $smtp->data();
        $smtp->datasend("From: $from\n");
        $smtp->datasend("To: $to\n");
        $smtp->datasend("\n");
        $smtp->datasend("$body");
        $smtp->dataend();

        $smtp->quit;

        I copied most of it from the documentation but the
        documentation doesnt seem to specify how to create a
        subject field. Does anyone know how to do this? The
        link to the module page is right here.

        http://search.cpan.org/author/GBARR/libnet-1.16/Net/SMTP.pm

        Thx again,

        Leon


        __________________________________
        Do you Yahoo!?
        Yahoo! SiteBuilder - Free, easy-to-use web site design software
        http://sitebuilder.yahoo.com

        Yahoo! Groups Sponsor
        ADVERTISEMENT




        Unsubscribing info is here:
        http://help.yahoo.com/help/us/groups/groups-32.html

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


        [Non-text portions of this message have been removed]


        - ------------------------ Yahoo! Groups Sponsor

        Unsubscribing info is here:
        http://help.yahoo.com/help/us/groups/groups-32.html

        Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/



        -----BEGIN PGP SIGNATURE-----
        Version: PGP 8.0

        iQA/AwUBPypzUO+1MixlNMpYEQIp5wCgzYY0+IQzT83L9tSQYeVQT8URTIcAoLvt
        0fyKiZerJYK7drH4xQFjXlOq
        =GU2J
        -----END PGP SIGNATURE-----


        INDEPENDENCE COMMUNITY BANK CONFIDENTIALITY NOTICE: This message
        (and any attachment) is confidential and
        intended for the sole use of the individual or entity to which it is addressed. If you are
        not the intended recipient, you must not review, retransmit, convert to hard-copy,
        copy, use or disseminate this email or any of its attachments. If you received this email
        in error, please notify the sender immediately and delete it. This notice is automatically
        appended to all Internet email.
      Your message has been successfully submitted and would be delivered to recipients shortly.