Jump to content

Recommended Posts

Posted

I can't get perl to send out an email. Below is the code I was using. All messages print fine. No errors reported. Just don't get any email.

 

Any ideas???

 

>#!/usr/bin/perl
# Define Variables
$mailprog = '/usr/sbin/sendmail';
print "Content-type: text/html\n\n";
print "<html><body>this is a 6 test</body></HTML>\n";
open (MAIL, "|$mailprog whatever@mrmail.com") || die "Can't open $mailprog!\n";
print MAIL "From: me@mail.com \n";
print MAIL "To: you@mail.com\n";
print MAIL "Subject: test 29\n\n";
print MAIL "THIS IS THE TEST\n";
close (MAIL);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...