Sending mail from a separate list dont work

Status
Not open for further replies.

mattsh

Member
Hi!

Have a separate list (phone book) for our staff.

I make a new list and add db-join field for the staff to select name and a cdd to collect their mail (from phone book).
The form looks fine with correct data, but I don't manage to send at mail via the forms emil plugin. Sending mail work if I add a hard coded email in the to field. I guess that as the mail field is joined (ccd) only the id is used and not the real mail.

How to solve this?

Regards
Matt
Joomla 3.8.5
Fabrik 3.8
 
After some testing, sadly I can't make it work, no email is sent from the form.

Tabels
Staff:
jos3_fb_staff___id
jos3_fb_staff___name
jos3_fb_staff___email

Registraton:
jos3_fb_registration___name_id (join elemnt)
jos3_fb_registration___email_id (CDD elemnt)

And on the form a emil-plugin with this code:
Code:
$myEmail = '';
$staffId ='{jos3_fb_staff___id_raw}';
if (!empty($staffId)) {
   $db = JFactory::getDbo();
   $query = $db->getQuery(true);
   $query->select('email')->from('jos3_fb_staff')->where('id = ' . (int)$staffId);
   $db->setQuery($query);
   $myEmail = $db->loadResult();
}
return $myEmail;

Regards
Matt
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top