RE: Spam:Re: Frowarding mail automatically through script
From: Michael Kraus (mkraus_at_wildtechnology.net)
Date: 11/29/04
- Next message: Michael Kraus: "RE: map vs foreach"
- Previous message: Jonathan Paton: "Re: map vs foreach"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 11:16:57 +1100 To: <anish@vitalect-india.com>, <vbhakit@yahoo.co.in>
G'day...
Better yet, use MIME::Lite
E.g.
sub mail() {
my $from = 'email@email.net';
use MIME::Lite;
my $mail = MIME::Lite->new(
From => $from,
To => $recipient,
Subject => "From Guest Book $subject",
Body => $content,
);
$mail->send();
}
See CPAN for more details. :)
Regards,
Michael S. E. Kraus
Software Developer
Wild Technology Pty Ltd
_______________________________
ABN 98 091 470 692
Level 4 Tiara, 306/9 Crystal Street, Waterloo NSW 2017, Australia
Telephone 1300-13-9453 | Facsimile 1300-88-9453
http://www.wildtechnology.net
The information contained in this email message and any attachments may
be confidential information and may also be the subject of client legal
- legal professional privilege. If you are not the intended recipient,
any use, interference with, disclosure or copying of this material is
unauthorised and prohibited. This email and any attachments are also
subject to copyright. No part of them may be reproduced, adapted or
transmitted without the written permission of the copyright owner. If
you have received this email in error, please immediately advise the
sender by return email and delete the message from your system.
> -----Original Message-----
> From: anish@vitalect-india.com [mailto:anish@vitalect-india.com]
> Sent: Sunday, 28 November 2004 5:02 PM
> To: vbhakit@yahoo.co.in
> Cc: beginners@perl.org
> Subject: Spam:Re: Frowarding mail automatically through script
>
> sub mail()
> {
> my $from="email\@email.net";
> my $to=$recipient;
> my $sendmailpath="/usr/sbin/sendmail";
>
>
> open (SENDMAIL, "| $sendmailpath -t");
>
>
> print SENDMAIL "Subject: From Guest Book $subject\n";
>
>
> print SENDMAIL "From: $from\n";
>
>
> print SENDMAIL "To: $to\n\n";
>
>
> print SENDMAIL "$content\n\n";
>
> close (SENDMAIL);
>
>
> }
>
>
> > i had written following script for sending mail
> automatically through
> > PERL using "sendmail" program in the perl script.
> > But its not workig. What may be the problem with it.
> >
> > #!/usr/local/bin/perl
> > $name = 'name';
> > $email = 'mail id';
> > open(MAIL, "| /usr/lib/sendmail -oi -n -t"); print MAIL
> > <<EMAIL_TO_USER; To:$email From:"somebody\@domain.com
> > Subject: More Information
> > Dear $name:
> > Thank you for contacting us. We will send you the material to this
> > email address. EMAIL_TO_USER close MAIL; print
> > "Content-type:text/html\n\n"; print <<HTML_RESPONSE; <html>
> > <title>Thank You Page</title> <h1>Thanks!</h1> Thanks,
> $name!<br> I'll
> > mail information to $address right away.
> > </html>
> >
> >
> >
> >
> > Yahoo! India Matrimony: Find your life partneronline.
>
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org For
> additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
- Next message: Michael Kraus: "RE: map vs foreach"
- Previous message: Jonathan Paton: "Re: map vs foreach"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]