
mwaf
Deleted
Jun 15, 2000, 3:26 AM
Post #1 of 2
(5855 views)
|
I've installed ActivePerl on a local server and it works fine. However, I don't know how to get a sendmail program to work. Where can I get one or do I have it allready? $mailprog = '/usr/lib/sendmail'; This doesn't lead anywere at least (this is what works with my ISP), well it runs the rest of the script without any errors. The complete code I used: <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> #!/usr/bin/perl $name = "whoever"; $email = "whatever"; $recipient = "myname\@domain.com"; $message = "The message"; $mailprog = '/usr/lib/sendmail'; open (MAIL, "|$mailprog $recipient"); print MAIL "To: $recipient\n"; print MAIL "From: $email\n"; print MAIL "Subject: Feedback\n"; print MAIL "This mail was sent to you by\nby $name (Email: $email)\n"; print MAIL "------------------------------------------------------\n"; print MAIL "$message\n"; print MAIL "------------------------------------------------------\n"; print MAIL "\n"; close (MAIL); print "Content-type:text/html\n\n"; print "Done";</pre><HR></BLOCKQUOTE> The result after executing: <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> Done</pre><HR></BLOCKQUOTE> and of course; no mail in the mailbox. [This message has been edited by mwaf (edited 06-15-2000).]
|