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

Mulitple 'From' Email addresses


  1. fredwin
    Member

    I have a form that is being used by a different area, and they require that the from email be something different. How do I get other options into the drop down list in email_settings page?

    Fred

    Posted 15 years ago #
  2. yuniar

    Which email you are referring to?
    The one being sent to admin or the one being sent to users?


    MachForm Founder

    Posted 15 years ago #
  3. fredwin
    Member

    The From address that shows up in either emails, or another way the one defined about line 43 of config.php

    Posted 15 years ago #
  4. yuniar

    Hmm. ok, let say we need to add these emails to the dropdown:
    - userA@example.com
    - userB@example.com

    Edit your email_settings.php file, search around line 90 and you'll find this:

    $esl_email_fields = array_merge($esl_email_fields,$email_fields);


    right above that line, insert this code:

    $esl_email_fields[1]['label'] = "userA@example.com";
    $esl_email_fields[1]['value'] = "userA@example.com";
    
    $esl_email_fields[2]['label'] = "userB@example.com";
    $esl_email_fields[2]['value'] = "userB@example.com";

    If you need to add more emails, simply add another pairs. Make sure to adjust the index number between the square bracket.


    MachForm Founder

    Posted 15 years ago #
  5. fredwin
    Member

    Perfect as always yuniar :)

    Posted 15 years ago #

RSS feed for this topic

Reply