Re: Shell scripts and the SMTP protocol
From: Paul Smith (phhs80_at_hotpop.com)
Date: 07/12/04
- Next message: Heiner Steven: "Re: comp.unix.shell FAQ - Answers to Frequently Asked Questions"
- Previous message: foo: "Re: head, recursively through file tree?"
- Maybe in reply to: Paul Smith: "Shell scripts and the SMTP protocol"
- Next in thread: joe_at_invalid.address: "Re: Shell scripts and the SMTP protocol"
- Reply: joe_at_invalid.address: "Re: Shell scripts and the SMTP protocol"
- Reply: John W. Krahn: "Re: Shell scripts and the SMTP protocol"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Jul 2004 13:47:32 -0700
>> I am wanting to write a script to send an e-mail through the SMTP
server
>> of my ISP. What is the proper command to do this?
>
> #!/usr/bin/perl
>
> use Mail::Mailer;
>
> my $mailer = new Mail::Mailer smtp => Server => 'smtp.hotpop.com';
>
> $mailer->open( {
> To => 'My Friend <myfriend@example.com>',
> From => 'Paul Smith <phhs80@hotpop.com>',
> Subject => 'This is a test',
> } );
>
> print $mailer <<BODY;
> Hi,
>
> This is a test.
>
> Paul
> BODY
>
> $mailer->close;
>
> __END__
Meanwhile, I have replaced the smtp server with a different one and
John Krahn's script worked nicely. Unfortunately, I get the e-mails
(sent by John's script) showing a time as they were sent one hour
before. Is there some way of repairing it?
Paul
- Next message: Heiner Steven: "Re: comp.unix.shell FAQ - Answers to Frequently Asked Questions"
- Previous message: foo: "Re: head, recursively through file tree?"
- Maybe in reply to: Paul Smith: "Shell scripts and the SMTP protocol"
- Next in thread: joe_at_invalid.address: "Re: Shell scripts and the SMTP protocol"
- Reply: joe_at_invalid.address: "Re: Shell scripts and the SMTP protocol"
- Reply: John W. Krahn: "Re: Shell scripts and the SMTP protocol"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|