Solved

Simple Trigger to Send Email

Posted on 2004-09-07
4
1,873 Views
Last Modified: 2006-11-17
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
0
Comment
Question by:mfarley
  • 3
4 Comments
 
LVL 14

Expert Comment

by:Jan_Franek
ID: 11999922
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
 
LVL 14

Expert Comment

by:Jan_Franek
ID: 11999929
Oooops sorry, I overlooked, that you are on ASA - my post is about ASE.
0
 
LVL 14

Accepted Solution

by:
Jan_Franek earned 250 total points
ID: 12000042
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
 

Author Comment

by:mfarley
ID: 12000422
Jan,

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

-Matt
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
Some of the SEO trends we might expect in 2017.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question