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!

Sendmail(netserver-smtp)

Status
Not open for further replies.

vintl

Technical User
Jun 9, 2000
72
MY
regarding the Net-SMTP for windows(i use activestate perl), 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?
if not, how is the script look like?

$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;
 
vintl,

Try Mail::Sendmail, install available using PPM - which comes with your activestate installation. I'm sorry but I'm not familiar with Netserver::SMTP but Mail::Sendmail will do the job for you. 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