Did you use Perl on Linux ?
If so, could you please tell me
what rpms you have installed,
which ODBC for unix you are using an
what are the values for $ODBCHOME
and LD_LIBRARY_PATH ?
I have some mismatch here.
Thanks
--- In [EMAIL PROTECTED], Flemming Frandsen <[EMAIL PROTECTED]> wrote:
> Carsten Kuckuk wrote:
> > Implementation seems to be easiest using Java. For DB access you can
> > use JDBC, and for sending e-mail you can use the JavaMail API.
>
> Only if you don't know perl, apart from the call that actually sends
the
> mail (look for Net::SMTP) this is all of it, just run it every 5
minutes
> from cron and you are done:
>
> #!/usr/bin/perl -w
> use strict;
> use DBI;
>
> my $dbh = DBI->connect_cached('dbi:ODBC::DBNAME', 'USER', 'PASSWD',
> {
> AutoCommit=>0,
> RaiseError=>0,
> PrintError=>0,
> LongReadLen=>10000,
> odbc_ignore_named_placeholders=>1,
> });
>
> my $select = $dbh->prepare_cached('
> SELECT email_id, toaddress, subject, body
> FROM unsent_email');
> $select->exeute;
>
> while (my ($email_id,$to,$subject,$body) = $select->fetchrow_array) {
> # Send the mail.
>
> my $delete = $dbh->prepare_cached('
> DELETE FROM unsent_email
> WHERE email_id=?');
> $delete->exeute($email_id);
> }
>
> $dbh->commit;
> $dbh->disconnect;
>
> --
> Regards Flemming Frandsen - http://dion.swamp.dk
> PartyTicket.Net co founder & Yet Another Perl Hacker
>
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general