If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > send a mail by stored procedure in msyql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-26-11, 03:50
Pawan Kumar Pawan Kumar is offline
Registered User
 
Join Date: Mar 2008
Posts: 120
Question send a mail by stored procedure in msyql

Hi All,
Could anyone help me out how to send mail from stored procedure in mysql??


Thanks..
__________________
Regards
Pawan Kumar
Reply With Quote
  #2 (permalink)  
Old 04-26-11, 04:32
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
I guess the easiest method would be to :
  • Create a table to hold the emails (id, email, subject, body, sent_flg ).
  • Get your trigger to write to this table.
  • Have a process (Unix cron job etc) that polls this table looking for any new entries (ie where not sent).
  • When it finds one then it sends the email and updates the sent flag.
  • I'd also have a time showing when the record was added and when it was sent.
__________________
Mike
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On