hi,
i can tell you how to send an email from sql server. you should put that code where you think it is necessary (in an sp, trigger, job etc..)
DECLARE @rc int
EXEC @rc = master.dbo.xp_smtp_sendmail
@FROM = N'
[email protected]',
@FROM_NAME = N'Your name',
@TO = N'
[email protected]',
@replyto = N'
[email protected]',
@CC = N'',
@BCC = N'',
@priority = N'NORMAL',
@subject = N'your subject',
@message = N'your message',
@messagefile = N'',
@type = N'text/plain',
@attachment = N'attcahmentfilepath',
@attachments = N'',
@codepage = 0,
@server = N'youremailservers ip'
you can read "xp_smtp_sendmail" sP documentation for details..
hope it works