Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008
    Posts
    136

    Question Unanswered: 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

  2. #2
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •