0

Is this possible to send a mail using mysql stored procedure?

I am using phpmyadmin. I need to send a mail in which from, to and subject are in database table column values?

I google it but not find much information to proceed.

Deepak
  • 79
  • 4
  • 14
  • Possible duplicate of [how to send mail from mysql using stored-procedures?](http://stackoverflow.com/questions/7594081/how-to-send-mail-from-mysql-using-stored-procedures) – Hermanto Dec 08 '16 at 07:33
  • @Hermanto But this link shows it is possible. http://stackoverflow.com/questions/387483/how-to-send-email-from-mysql-5-1 – Deepak Dec 08 '16 at 07:40
  • 1
    Yes it's possible, but does not mean that the SP itself can send an email. We still need a program that access and read MySQL data and then send the email. If you still want send email from SP, I suggest you to read more about MySQL UDF sys_exec like on [this SO question](http://stackoverflow.com/questions/24433851/mysql-error-1305-function-db-sys-exec-does-not-exists). But at the end you still need a program to send email. – Hermanto Dec 08 '16 at 07:48
  • Did you know how to send a mail using cronjob in which to, subject and message content is in separate table? – Deepak Dec 09 '16 at 05:42
  • It's a different question. You can ask it on this SO or askubuntu.com. For a good start, maybe this [link](http://askubuntu.com/questions/332481/setup-cron-job-to-send-email-to-a-bunch-of-people-on-a-regular-basis) and this [link](http://stackoverflow.com/questions/8260858/how-to-send-email-from-terminal) can help. – Hermanto Dec 09 '16 at 06:22

0 Answers0