This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

multiple email notification


  1. dennisoshields
    Member

    How would I set up the notifier to send an email to both the person that fills out the form and the person that is responsible (say, a student and their teacher) as well as the admin? Of course, this won't be known until the form is filled out and would show up as teacher email and student email.

    For example, I'd like to see the ability to have a mutiple select for that instead of a pulldown.

    How would I accomplish this?

    Posted 15 years ago #
  2. yuniar

    Do you mean you would like to send email to multiple addresses based on selected checkboxes on your form?


    MachForm Founder

    Posted 15 years ago #
  3. dennisoshields
    Member

    Actually, I'd like to do it based on data that they would put into a text field.

    One text field is the Teacher, the other is the Student email - so it would be like {element_17} and maybe {element_20}.

    Posted 15 years ago #
  4. redityo

    Hi,

    Try to edit your "includes/post-functions.php" file, goto line 1131 ~ 1134 you'll find these code :

    //to email
    if(is_numeric($esr_email_address)){
    	$esr_email_address = '{element_'.$esr_email_address.'}';
    }

    add exactly bellow those code :

    //to email
    if($form_id == '1') {
    	$esr_email_address = '{element_17},{element_20}';
    }

    In there I assume your email field id (student & teacher) is 17 & 20 in form 1. But make sure you already set one of them in "Your users" email setting .


    MachForm Support

    Posted 15 years ago #
  5. dennisoshields
    Member

    Nice. Elegant even.

    Checks for the correct form and then adds it only for that form.

    I can use that idea other places as well.

    Thanks.

    Posted 15 years ago #
  6. grandeland
    Member

    Can someone please help me with this: I did as above and added
    //to email
    if($form_id == '1') {
    $esr_email_address = '{element_5},{element_6},{element_7}';
    }

    I have three additional email form fields that are dynamic. So if someone puts email addresses in those additional email form fields I'd like a copy of the form to be sent to those email address. The problem is nothing happens. Anyone on the additional email form never receives the email. What would be incorrect? Maybe the element number? I get the number from the form builder when I highlight the form. Thank you

    Posted 14 years ago #
  7. redityo

    have you change the form id with yours ? and also you need to set one of those mail field in your form for the trigger (Your users section).


    MachForm Support

    Posted 14 years ago #
  8. MKachtan
    Member

    I have a similar request. I have my form setup to email multiple people in the "You" section, with the "From Email Address" being the email the user entered in the form. I would like to setup the "Your Users" to send an exact copy of the form to a single address but with a "From Email Address" being one that I specify.

    Posted 14 years ago #
  9. MKachtan
    Member

    To be a little clearer.

    My form is setup to email a group of people with the from address being pulled from the "Your Address" field on the form. I would like to send a duplicate email to another group of people but with a from address of "no-reply@domain.com". Is this possible?

    Posted 14 years ago #
  10. 2farnorth
    Member

    I'm loving the Machform but am having the same problem as grandeland -
    edited includes/post-functions.php and added:
    if($form_id =='1'){
    $esr_email_address = '{element_27},{element_28},{element_26}';
    }
    my form_id is correct (checked db)
    my element_ ids are correct (checked html source code & db)
    It doesn't seem to matter which selection I try in the 'Your Users' section of the admin interface, only the one selected gets the email.

    Is there something else I need to do for it to send the summary to multiple emails? It works great for the admin and 1 user...

    Thanks!

    Posted 14 years ago #
  11. redityo

    @MKachtan,

    Do you mean, you want to send mail notification to the mail list on "you" section but with from email address "no-reply@domain.com" ?

    @2farnorth,

    Your code should working fine, anyway I think to check this further, could you send me your "post-functions.php" file and the form url to :

    customer.service[at]appnitro.com


    MachForm Support

    Posted 14 years ago #
  12. redityo

    Ups .. sorry, I've post the wrong line. It should around line 1131 ~ 1134, I've fixed above code anyway.


    MachForm Support

    Posted 14 years ago #

RSS feed for this topic

Reply