We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    Hello,
    I’ve been trying for hours to get the mailselector working but I’m not able to get those emails - using a single mail address in the &to parameter works just fine. I’ve run the snippet call with the debug parameter but I’m unable to figure out what’s going wrong - hopefully somebody can help please!!

    this is the debug info:
    eForm configuration:
    array (
      'snipPath' => '/home/vsbtuch/public_html/assets/snippets/eform/',
      'snipFolder' => 'eform',
      'vericode' => '1',
      'formid' => 'feedback',
      'from' => '[email protected]',
      'fromname' => 'VSBTU',
      'to' => ''maiaddresses.com,
      'cc' => '',
      'bcc' => '',
      'subject' => 'Website Anfrage',
      'ccsender' => 0,
      'sendirect' => 0,
      'mselector' => 'destination',
      'mobile' => '',
      'mobiletext' => '',
      'autosender' => NULL,
      'autotext' => '',
      'category' => 0,
      'keywords' => '',
      'gid' => 18,
      'noemail' => false,
      'saveform' => true,
      'tpl' => 'tplContact',
      'report' => 'tplReport',
      'allowhtml' => 0,
      'replyto' => '',
      'language' => 'english',
      'thankyou' => 'tplThankYou',
      'isDebug' => '3',
      'reportAbuse' => false,
      'disclaimer' => '',
      'sendAsHtml' => false,
      'sendAsText' => false,
      'sessionVars' => false,
      'postOverides' => 0,
      'eFormOnBeforeMailSent' => '',
      'eFormOnMailSent' => '',
      'eFormOnValidate' => '',
      'eFormOnBeforeFormMerge' => '',
      'eFormOnBeforeFormParse' => '',
      'cssStyle' => '',
      'jScript' => '',
      'submitLimit' => 0,
      'protectSubmit' => 1,
      'requiredClass' => 'required',
      'invalidClass' => 'invalid',
      'runSnippet' => '',
      'autoSenderName' => '',
      'version' => '1.4.4',
    )
    
    
    
    WARNING - DEBUGGING IS ON 
    Make sure you turn debugging off before making this form live!
    
    name
    array (
      0 => 'name',
      1 => 'Name',
      2 => 'name',
      3 => '1',
    )company
    array (
      0 => 'company',
      1 => 'Firma',
      2 => '',
      3 => '0',
    )city
    array (
      0 => 'city',
      1 => 'Ort',
      2 => '',
      3 => '0',
    )phone
    array (
      0 => 'phone',
      1 => 'Telefon',
      2 => '',
      3 => '0',
    )email
    array (
      0 => 'email',
      1 => 'E-mail',
      2 => 'email',
      3 => '1',
    )subject
    array (
      0 => 'subject',
      1 => 'Betreff',
      2 => 'subject',
      3 => '0',
    )submit
    array (
      0 => 'submit',
      1 => 'submit',
      2 => '',
      3 => 0,
    )reset
    array (
      0 => 'reset',
      1 => 'reset',
      2 => '',
      3 => 0,
    )formid
    array (
      0 => 'formid',
      1 => 'formid',
      2 => '',
      3 => 0,
    )Parsed template
    <p class="error">[+validationmessage+]</p> 
    <form method="post" action="index.php?id=18" id="feedback" name="feedback" enctype="multipart/form-data"> 
    <fieldset> 
    <legend>Kontakt Formular</legend> 
    <ul> 
    <li> 
    <label for="cfDestination" class="[+cfDestination_vClass+]">An:</label> 
    <select name="destination" id="cfDestination" class="[+destination_class+]"> 
    <option value="zinsli" [+destination:zinsli+]>Urs Zinsli - Präsident</option> 
    <option value="haag" [+destination:haag+]>Jakob Haag - Vizepräsident</option> 
    <option value="furrer" [+destination:furrer+]>Beat Furrer - Finanzvorstand</option> 
    <option value="monnier" [+destination:monnier+]>Jean-Lous Monnier - Mitglied</option> 
    <option value="schnyder" [+destination:schnyder+]>Konrad Schnyder - Mitglied</option> 
    <option value="jaeger" [+destination:jaeger+]>Amandus Jäger - Delegierter</option> 
    <option value="mannes" [+destination:mannes+]>Ernst Mannes - Delegierter</option> 
    <option value="clough" [+destination:clough+]>Yvonne Clough - Sekretariat</option> 
    <option value="webmaster" [+destination:webmaster+]>Webmaster</option> 
    </select> 
    </li> 
    <li> 
    <label for="cfName" class="[+cfName_vClass+]">Name<em>*</em>:</label> 
    <input class="[+name_class+]" name="name" id="cfName" type="text" value="[+name+]" /> 
    </li> 
    <li> 
    <label for="cfCompany" class="[+cfCompany_vClass+]">Firma:</label> 
    <input name="company" id="cfCompany" type="text" class="[+company_class+]" value="[+company+]" /> 
    </li> 
    <li> 
    <label for="cfCity" class="[+cfCity_vClass+]">Ort:</label> 
    <input name="city" id="cfCity" type="text" class="[+city_class+]" value="[+city+]" /> 
    </li> 
    <li> 
    <label for="cfPhone" class="[+cfPhone_vClass+]">Telefon:</label> 
    <input name="phone" id="cfPhone" type="text" class="[+phone_class+]" value="[+phone+]" /> 
    </li> 
    <li> 
    <label for="cfEmail" class="[+cfEmail_vClass+]">Email<em>*</em>:</label> 
    <input class="[+email_class+]" name="email" id="cfEmail" type="text" value="[+email+]" /> 
    </li> 
    <li> 
    <label for="cfSubject" class="[+cfSubject_vClass+]">Betreff:</label> 
    <input name="subject" id="cfSubject" type="text" class="[+subject_class+]" value="[+subject+]" /> 
    </li> 
    <li> 
    <label for="cfMessage" class="[+cfMessage_vClass+]">Kommentar<em>*</em>:</label> 
    <textarea class="[+message_class+]" name="message" id="cfMessage" rows="5" cols="30">[+message+]</textarea> 
    </li> 
    <li class="captcha"> 
    <label><span class="small">Bitte Code im nächsten Feld wiederholen:</span></label> 
    <img src="[+verimageurl+]" alt="Sicherheitscode" border="0" /> </li> 
    <li> 
    <label for="vericode" class="[+vericode_vClass+]">Code<em>*</em>:</label> 
    <input class="[+vericode_class+]" type="text" name="vericode" id="vericode" value="" /> 
    </li> 
    <li class="submit"> 
    <label> </label> 
    <input class="[+submit_class+]" type="submit" name="submit" id="cfSubmit" value="Absenden" /> 
    <input class="[+reset_class+]" type="reset" name="reset" id="cfReset" value="Löschen" /> 
    </li> 
    </ul> 
    </fieldset> 
    <input type="hidden" name="formid" class="[+formid_class+]" value="feedback" /></form>
    
    
    --------------------------------------------------------------------------------
    'destination' passed using rule: #LIST zinsli,haag,furrer,monnier,schnyder,jaeger,mannes,clough,webmaster, (input=webmaster)
    'formid' passed using rule: #VALUE feedback, (input=feedback)
    SESSION HASH:5e6e2bfcd243b26208b7e481b72a4532
    FORM HASH:4071f53c6d63df8f17a17c67c1c966e7
    Mail Headers:
    From: [email protected] (VSBTU)
    Reply-to:[email protected]
    To: [email protected]
    Subject: 
    CC: 
    BCC:
    
    Formats array:
    array (
      'destination' => 
      array (
        0 => 'destination',
        1 => 'destination',
        2 => 'listbox',
        3 => 0,
        4 => 'Incorrect value',
        5 => '#LIST zinsli,haag,furrer,monnier,schnyder,jaeger,mannes,clough,webmaster',
      ),
      'name' => 
      array (
        0 => 'name',
        1 => 'Name',
        2 => 'name',
        3 => '1',
      ),
      'company' => 
      array (
        0 => 'company',
        1 => 'Firma',
        2 => 'string',
        3 => '0',
      ),
      'city' => 
      array (
        0 => 'city',
        1 => 'Ort',
        2 => 'string',
        3 => '0',
      ),
      'phone' => 
      array (
        0 => 'phone',
        1 => 'Telefon',
        2 => 'string',
        3 => '0',
      ),
      'email' => 
      array (
        0 => 'email',
        1 => 'E-mail',
        2 => 'email',
        3 => '1',
      ),
      'subject' => 
      array (
        0 => 'subject',
        1 => 'Betreff',
        2 => 'subject',
        3 => '0',
      ),
      'message' => 
      array (
        0 => 'message',
        1 => 'Kommentar',
        2 => 'textarea',
        3 => '1',
      ),
      'submit' => 
      array (
        0 => 'submit',
        1 => 'submit',
        2 => 'submit',
        3 => 0,
      ),
      'reset' => 
      array (
        0 => 'reset',
        1 => 'reset',
        2 => 'reset',
        3 => 0,
      ),
      'formid' => 
      array (
        0 => 'formid',
        1 => 'formid',
        2 => 'hidden',
        3 => 0,
        4 => 'Tampering attempt detected!',
        5 => '#VALUE feedback',
      ),
    )
    Fields array:
    array (
      'cfDestination_vClass' => '',
      'cfName_vClass' => '',
      'cfCompany_vClass' => '',
      'cfCity_vClass' => '',
      'cfPhone_vClass' => '',
      'cfEmail_vClass' => '',
      'cfSubject_vClass' => '',
      'cfMessage_vClass' => '',
      'vericode_vClass' => '',
      'name_class' => 'required',
      'email_class' => 'required',
      'message_class' => 'required',
      'vericode_class' => 'required',
      'submit_class' => 'btn',
      'reset_class' => 'btn',
      'destination' => 'webmaster',
      'name' => 'Marco Jaeger',
      'company' => '',
      'city' => '',
      'phone' => '',
      'email' => '[email protected]',
      'subject' => '',
      'message' => 'Test message',
      'submit' => 'Absenden',
      'reset' => '',
      'formid' => 'feedback',
      'vericode' => 'Parser552',
      'postdate' => '20-Dec-2007 00:07:05',
      'disclaimer' => '',
    )
      • 30223
      • 1,010 Posts
      When using the &mailselector parameter the select field needs to return a numeric index. Yours returns a text value. (see the fields array in the debug printout)

      Try this instead:
      <label for="cfDestination" class="[+cfDestination_vClass+]">An:</label> 
      <select name="destination" id="cfDestination" > 
      <option value="1" >Urs Zinsli - Präsident</option> 
      <option value="2" >Jakob Haag - Vizepräsident</option> 
      <option value="3" >Beat Furrer - Finanzvorstand</option> 
      <option value="4" >Jean-Lous Monnier - Mitglied</option> 
      <option value="5">Konrad Schnyder - Mitglied</option> 
      <option value="6" >Amandus Jäger - Delegierter</option> 
      <option value="7">Ernst Mannes - Delegierter</option> 
      <option value="8" >Yvonne Clough - Sekretariat</option> 
      <option value="9">Webmaster</option> 
      </select> 
      


      I’m not a 100% sure if the numeric index should start with 1 or 0 (and from where I am just now I don;t have access to any code) so if you get the wrong email address at first, try starting the list with value 0 (zero).
        • 19889
        • 616 Posts
        Thanks - you saved me some additional hours - I thought of number those option values but it was kind of too late to give it a try - the values needs to start at 1. What I was wondering was why the option values could not be set to the email address instead of having them in the snippet call as well as whether it is possible to send the form two e.g. 3 members at the time if I would use a multi-select box but first, let’s get it working the way it is.

        Thanks again
          • 33372
          • 1,611 Posts
          I think your &mailselector parameter is incorrect (it should be "destination", but it says "to").
          EDIT: Hey did you just figure that out on your own and edit the post above, or am I going crazy?

          Quote from: mmjaeger at Dec 19, 2007, 10:55 PM

          What I was wondering was why the option values could not be set to the email address instead of having them in the snippet call.
          Spambots would like that a little too much...
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 19889
            • 616 Posts
            @ZAP - just figured that out - have been playing with that stuff for too long - on my server as well as locally - sorry for being a pain, but it works now.

            the only thing that kind of bothers me a the moment that the emails end up in the junk folder in Outlook - hope there is a way around it.

            Thanks again