Alright, there are many questions here:
- Are you running on Windows, Mac, or some Unix variant? Your mention of folders implies Windows...
- Perl can send mail, or it can call an outside program to send mail.
- Sendmail is an outside program to send mail on unix-like systems. It is not a folder/directory, it is a program.
- See the answers in How do I send e-mail from my Perl Program?
- Please be more specific in the future. What does the program you are running look like? What errors does it give you when it doesn't work?
| [reply] |
Use Mail::Send. Easiest to get working, should be
portable. | [reply] |
well,I run the program on windows 98,using the personal web server and I using the activestate perl version 5.6.0.I tried to install the MailTools,but it always fails.I download the MailTools from the CPAN site,and then I tried to install it using the PPM,using the command
ppm>install MailTools
and it said Error installing package MailTools.Could not locate PPD file.
What is the correct way to get the MailTools installed to the my Perl 5.6 using the PPM.Or is there any other way?
Besides,
My program that I want to run look like this,just to test if the send mail program works,
#!/usr/bin/perl
use Mail::Mailer;
$from_address = "vrempire";
$to_address = "vrempire\@hotmail.com";
$subject = "REGISTRATION FOR NEW MEMBER";
$body = "REGISTRATION FOR NEW MEMBER";
$mailer = Mail::Mailer->new();
$mailer->open({ From => $from_address,
To => $to_address,
Subject => $subject,
})
or die "Can't open: $!\n";
print $mailer $body;
$mailer->close();
When I want to execute it using the command prompt,it returns the message
Bad command or file name
Can't locate auto/Mail/Util/mailaddress.al in @INC (@INC contains: c:/
+Perl/lib c:/Perl/site/lib .) at C:/Perl/lib/Mail/Mailer/smtp.pm line
+21
.
Please help me on this,friends...
Your concern is very appreciated by me.
| [reply] [d/l] [select] |
(1) We use blat.exe to send mail on Windows from perl. Go to google.com and search on blat to get it.
(2) You will need the URL or IP address of a mail server, or you will need to install and configure one. I have never done installed a mail server, but I think that there is more to it than finding the correct folder.
(3) Your mail server must have mail relaying enabled if it is not located on your machine.
| [reply] |