7 years ago
6
Topic

Hi

I tried to force the recipients of an email field with a before storage code field.

Let's assume the email field is my_email and $emails-list is the list of email adresses (separated with a coma)

In the email field I checked the DEST. (admins) admin account: the site admin receives the email but I can't get the other people receive the email

I tried : 

$fields['my_email']->value = $emails-list;

$config['storages']['#__cck_store_form_mycontenttype']['my_email']=$emails-list;;

In the database I checked the column is properly filled but the email is ONLY sent to the admin account, not to the list of emails I wrote with the code field.

Is there something special to do please ?

thanks

cyril

Get a VIP membership
4229 Posts
Kadministrator
7 years ago
5
Level 1

Email field has no value, you need to set email field to use some_field as To(fields), then you can set value of some_field. Also it is probably better to use afterStore as emails are sent after store

7 years ago
4
Level 2

Hi Klas

I'm sorry I don't understand what you mean exactly by "you need to set email field to use some_field as To(fields)". Can you give an example please. 

thanks


cyril


4229 Posts
Kadministrator
7 years ago
3
Level 3

http://www.seblod.com/resources/extensions/archives/seblod-2-x-email-field

Create text field some_field and enter some_field in the To(fields) setting, this tells email field that some_field will contain a list of recipients.. Then you can alter some_field value in after or before Store to change list of recipients.

7 years ago
2
Level 4

Thanks Klas it's much clearer now.

May be we should set #some_field# instead of just some_field in the TO (fields) according to https://github.com/Octopoos/SEBLOD/issues/258 


cyril

4229 Posts
Kadministrator
7 years ago
1
Level 5

It should work without any #, otherwise it is a bug

7 years ago
0
Level 6

Yes Klas, it seems it's a bug in the new releases

thanks

cyril

Get a VIP membership