Simple Trigger to Send Email

Is there an easy way to create a simple trigger in a Sybase ASA DB that when there is an INSERT on table X, a simple message is emailed to an address?

Thanks!
-Matt
mfarleyAsked:
Who is Participating?
 
Jan FranekConnect With a Mentor Commented:
However, it seems like xp_sendmail exists in ASA as well (see ASA SQL reference / System objects / System procedures / System extended procedures - page 797 for version 9.0) and as it works with SMTP as well, you can probably use it even if you are not on Windows.
0
 
Jan FranekCommented:
Yes, if your server runs on Windows OS. Use xp_sendmail system extended procedure - see http://manuals.sybase.com/onlinebooks/group-as/asg1251e/sprocs for detailed info about parameters. And you need to set up Sybase to use mail - see http://manuals.sybase.com/onlinebooks/group-as/asp1250e/ntconfig.

If you are not on Windows, it's harder - you can write your own extended procedure in C to send mail or you can write an application that will fetch data from some table and sends mail based on fetched data.
0
 
Jan FranekCommented:
Oooops sorry, I overlooked, that you are on ASA - my post is about ASE.
0
 
mfarleyAuthor Commented:
Jan,

I just setup a test trigger that emails me exactly how I want it to -- Thanks to your help!

-Matt
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.