Re: Shell scripts and the SMTP protocol

From: Paul Smith (phhs80_at_hotpop.com)
Date: 07/12/04


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



Relevant Pages

  • Re: SQLCEReplication over GPRS
    ... Paul T. ... we aren't using an ISA server and unfortunately ... Internet side, just not over GPRS: ... verify that you're telling SQL CE the correct authentication settings ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Internal & extl domain on one exch server?
    ... The concept of an 'official mail server' is logical but I would ... It also seems to mean that when our current ISP closes shop, ... Regards, Paul N ...
    (microsoft.public.exchange.setup)
  • Re: using html control to download file from client to server
    ... Paul G ... Software engineer. ... DropDownList has a SelectedValue property. ... On the HTMLInputFile set the runat property to server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Auto reply to DL ( Bharat ? )
    ... Paul ... > published to the Organizational Forms library on Exchange servers), ... >> How exactly do I save the template on the server properly - I created the ...
    (microsoft.public.exchange.admin)
  • Re: Same logonserver even though a few DCs
    ... Thanks Paul. ... If you don't have the tools installed, install them from your server install ... Run dcdiag, netdiag and repadmin in verbose mode. ...
    (microsoft.public.windows.server.active_directory)