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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sbin and csv in window platform

Status
Not open for further replies.

vintl

Technical User
Jun 9, 2000
72
MY
does anyone know how i can include the sendmail function which is normally available in linux platform? where i can install that function for my perl program?

another thing is after i've installed the DBD-CSV,SQL-Statement, and Text-CSV_XS, i got this error message "Bad Directory Permissions : htdocs/admin/data". usually in linux environment, this problem can be solve be setting the chmod to 777 or something like that, but in window 2000 platform how can i solve this problem?

thanx
 
If you're on a Windows platform and are using the ActiveState distribution of Perl ( this distribution comes with a mail Module called Net::SMTP. I use this module quite often and it works wonderfully. I'd suggest giving that one a try.

If that doesn't work to your liking, there is a Windows "copycat" of Sendmail available, unfortunately, I don't remember what it is called. I'll get back to you on that one though once I find it again.

For your second problem, I'm not sure how to fix this. I don't use Windows 2000 (still on NT 4.0)

- Rieekan
 
regarding the Net-SMTP, i can't find, but found NetServer-SMTP. Is it the same?
in linux environment, i use the below command line to sendmail. so in windows, after installing the NetServer-SMTP, can i use back the below scripts?

$mailprog = "/usr/sbin/sendmail -t";


$stmt = "SELECT DISTINCT EMAIL FROM abc
$sth = $dbh->prepare($stmt);
$sth->execute;
while($row_ref = $sth->fetchrow_arrayref) {

$D_EMAIL = $row_ref->[0];

$mail_flag = "Content-Type: text/html; charset=us-ascii"

open(MAIL, "|$mailprog");
print MAIL <<&quot;mail_tag&quot;;
To: $D_EMAIL
From:
Subject: $F_SUBJECT
$mail_flag

$F_MSG

mail_tag
close(MAIL);


}
$sth->finish;
 
I don't think so no, have another look on the Windows PC, at the installed documentation for Net::SMTP. And try the following one-line Perl script to see if that module is installed.

use Net::SMTP;
Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top