29 lines
583 B
SQL
29 lines
583 B
SQL
DROP PROCEDURE IF EXISTS floranet.contact_request;
|
|
|
|
DELIMITER $$
|
|
$$
|
|
CREATE DEFINER=`root`@`localhost`
|
|
PROCEDURE floranet.contact_request(
|
|
vName VARCHAR(100),
|
|
vPhone VARCHAR(15),
|
|
vEmail VARCHAR(100),
|
|
vMessage TEXT)
|
|
READS SQL DATA
|
|
BEGIN
|
|
/**
|
|
* Set actions for contact request
|
|
*
|
|
* @param vName Name
|
|
* @param vPhone Phone number
|
|
* @param vEmail e-mail
|
|
* @param vMessage text of the message
|
|
*/
|
|
|
|
CALL vn.mail_insert(
|
|
'floranet@verdnatura.es',
|
|
vEmail,
|
|
'Contact request',
|
|
CONCAT('Phone: ',vPhone, ' Message: ', vMessage)
|
|
);
|
|
END$$
|
|
DELIMITER ; |