CF7 Email Sending Problem

How to fix ChronoForms v7 cutting off email addresses in BCC fields.

Overview

The issue occurs when loading a comma-separated list of email addresses from a database, which worked in v6 but fails in v7, causing addresses to be truncated at the @ symbol.
Use a PHP action to split the comma-separated string into an array before the email is sent, then reference that array variable in the recipients field.

Answered
ChronoForms v7
fb fbachofner-mayr 12 Jan, 2025

Hello!

I've got the following problem when sending emails with CF7:

I'm building a complex form in which a list of comma separated email addresses is loaded from a database table. I'm able to add these addresses as the bcc receivers of an email, but when sending this email, i get the following error:

It seems that the second email address is cut off at the @ symbol. Any suggestions/solutions?

Max_admin Max_admin 12 Jan, 2025

how do you add them ? if the addresses are not static (entered in the To field) then you need to have an array of addresses and use a shortcode

What is the value returned from the database table ?

And why not use v8 ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
fb fbachofner-mayr 15 Jan, 2025

The addresses are loaded directly from the database where they are provided as one comma separated value that (for example "xyz@xyz.org,yzx@yxz.net,..."). The value is generated by another component. This worked fine in v6 but seems broken in v7. 

Our website architecture does not allow an update to PHP 8.0 at this moment, as some of our most important components are not yet compatible with PHP 8, so v8 is not an option right now.

Max_admin Max_admin 15 Jan, 2025
Answer
1 Likes

then you will need to split it using PHP action before the email:

return explode(",", $this->get("read_data_name.column_name"));

then use {var:php_action_name} in your recipients

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.