Forum


Calc Builder Support

Calc Builder support
Forums
No se permite escribir sin estar logado. Por favor, login

Get email address from "Show send by email?" 05.12.2017 01:26

I want to change the Subject line to include the primary recipients email...i.e. the one entered via "Show send by email" mechanism.

For example...I'd like create a variable called SENDTO that has the email address in it so I can then manipulate the subject line like this
$subject=$subject." for ".SENDTO." - ".$dateandtime;

I tried SENDTO = $email.... and it works for the email sent to the recipient BUT for BCC recipients it doesn't and instead inserts the word ARRAY.

And even for the BCC recipients I want the subject to still have the email entered in the "Show send by email" field.

Thanks

Re: Get email address from 'Show send by email?' 05.12.2017 10:01

Hi,
when users click the 'send by email' option, the email filled is sent using 'email' variable. But this is an internal parameter, not one of your calculator fields, so in order to recover it at the calculator code you need to use standard joomla functions to get variables from the request:

$jinput = JFactory::getApplication()->input;

$emailentered = $jinput->get('email');


Here the official reference:

https://docs.joomla.org/Retrieving_request_data_using_JInput



Regarding bcc data, this is a list of emails, so you need to recover each one inside the array if you want to concatenate to build a text. There is a php function which does exactly this:

http://php.net/manual/en/function.implode.php


Hope this helps, regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Lo que nuestros clientes opinan de nosotros