Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail DBI problem

Status
Not open for further replies.

zebedie

MIS
May 4, 2001
1
GB
I am new to perl so excuse my ignorance, I have a csv file with char fields and am using DBI to access fields, one of these has a email address in, I have assigned the resulting email field to $email and can print it out to screen. When I try to use sendmail in the send_mail sub routine it does not work, hope you can help.

sub send_email {
$mailprog = '/usr/sbin/sendmail';
open(MAIL,"|$mailprog -t");
print MAIL "To: $email\n";
print MAIL "From: Billy the fish\n";
print MAIL "Subject: Testing the sendmail\n\n";
close (MAIL);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top