adriannunez
Member
Hi
I need to send a mail using form email plugin where the recipient address should be obtained with GET method.
I'm using this (the value of var1 is the user's id and it's obtained from the URL):
$jinput = JFactory::getApplication()->input;
$foo1 = $jinput->get('var1');
$db =& JFactory::getDBO();
$query_email = "SELECT email FROM p4p7n_users WHERE id LIKE $foo1 LIMIT 0,1";
$db->setQuery($query_email);
$email = $db->loadResult();
return $email;
I can see the correct email address when I use this code in a calc element, but no mail is sent on form submit.
Any ideas?
Thanks in advance.
I need to send a mail using form email plugin where the recipient address should be obtained with GET method.
I'm using this (the value of var1 is the user's id and it's obtained from the URL):
$jinput = JFactory::getApplication()->input;
$foo1 = $jinput->get('var1');
$db =& JFactory::getDBO();
$query_email = "SELECT email FROM p4p7n_users WHERE id LIKE $foo1 LIMIT 0,1";
$db->setQuery($query_email);
$email = $db->loadResult();
return $email;
I can see the correct email address when I use this code in a calc element, but no mail is sent on form submit.
Any ideas?
Thanks in advance.