We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38685
    • 59 Posts
    Paul Bakulich Reply #1, 17 years ago
    Hi I am currently stumped....

    I’ve created a list of checkboxes with
    multiple email addresses in their contents
    so that once checked it sends to multiple recipients.

    at the moment I’ve got this as my snippet... displayed 4 easy reading
    [!eForm?  
    &formid=`sendmepol` 
    &to=`[email protected]` 
    &tpl=`esendmepol` 
    &ccsender=`1` 
    &cc=`[+xtracontacts+]` 
    &report=`sendmepolreport` 
    &thankyou=`sendmepolthanks` !]
    



    this to populate my [+xtracontacts+]...

    <input type="checkbox" name="xtracontacts[]" value="[email protected], [email protected]" />
    John & Bill
    <br /><br />
    <input type="checkbox" name="xtracontacts[]" value="[email protected]" />
    Test Man
    <br /><br />
    


    The Thank You looks fine but I don’t get the CC: emails sent!

    Thank you!
    
    Thank you for utilising our site to help you to make your views known
    to those who make the decisions and legislation in our country. A copy of the message below has been sent to your email address for your records!
    Your name:   Paul Googler
    Your email address   [email protected]
    Sent to these email addresses:   [email protected], [email protected], [email protected]
    Subject:   This ought to work?!
    Your Message:   Woo hoo! Eform makes forms so easy!
    


    I see in the sent message header, THIS...

    Cc: <"[+xtracontacts+]"@*********.shr.prod.phx3.secureserver.net>

    not the addresses I want!

    Can someone point me in the right direction!?

    This must be a problem with PHPMailer &/or GoDaddies server, I think!?

    I have read all about the PHx problems but I haven’t been able to use the standard (()) fix!

    How would I use class.smtp.php instead of class.phpmailer.php?

    Eventually I hope to save the whole message 4 review into the database
    then moderate and batch send the approved ones, using eform2db.

    Thanks all 4 such a great CMS... And all your support crew that is developing it!

    My Modx Site Config....

    MODx version 1.0.0
    Version codename rev 5601
    Database Version: 5.0.67.d7-ourdelta-log
    Database Collation Charset utf8_general_ci
    PHP Version 5.2.8
    Linux blahblah.shr.prod.phx3.secureserver.net
    Server API CGI/FastCGI
    sendmail_path /usr/sbin/sendmail -t -i
    SMTP relay-hosting.secureserver.net
      Paul AL Bakulich - Association for Computing Machinery Professional Member
      http://palbakulich.me/ | http://twitter.com/#!/palhmbs
      • 38685
      • 59 Posts
      Paul Bakulich Reply #2, 17 years ago
      Found the &debug...

      WARNING - DEBUGGING IS ON
      Make sure you turn debugging off before making this form live!

      eForm configuration:
      array (
      ’snipPath’ => ’/home/content/51/4955951/html/sendme/assets/snippets/eform/’,
      ’snipFolder’ => ’eform’,
      ’vericode’ => ’’,
      ’formid’ => ’sendmepol’,
      ’from’ => ’[email protected]’,
      ’fromname’ => ’’,
      ’to’ => ’[email protected]’,
      ’cc’ => ’’,
      ’bcc’ => ’’,
      ’subject’ => ’’,
      ’ccsender’ => ’1’,
      ’sendirect’ => ’0’,
      ’mselector’ => ’0’,
      ’mobile’ => ’’,
      ’mobiletext’ => ’’,
      ’autosender’ => ’’,
      ’autotext’ => ’’,
      ’category’ => ’0’,
      ’keywords’ => ’’,
      ’gid’ => ’1’,
      ’noemail’ => ’’,
      ’saveform’ => ’1’,
      ’tpl’ => ’esendmepol’,
      ’report’ => ’sendmepolreport’,
      ’allowhtml’ => ’0’,
      ’replyto’ => ’’,
      ’language’ => ’english’,
      ’thankyou’ => ’sendmepolthanks’,
      ’isDebug’ => ’1’,
      ’reportAbuse’ => ’’,
      ’disclaimer’ => ’’,
      ’sendAsHtml’ => ’’,
      ’sendAsText’ => ’’,
      ’sessionVars’ => ’’,
      ’postOverides’ => ’0’,
      ’eFormOnBeforeMailSent’ => ’’,
      ’eFormOnMailSent’ => ’’,
      ’eFormOnValidate’ => ’’,
      ’eFormOnBeforeFormMerge’ => ’’,
      ’eFormOnBeforeFormParse’ => ’’,
      ’cssStyle’ => ’’,
      ’jScript’ => ’’,
      ’submitLimit’ => ’0’,
      ’protectSubmit’ => ’1’,
      ’requiredClass’ => ’required’,
      ’invalidClass’ => ’invalid’,
      ’runSnippet’ => ’’,
      ’autoSenderName’ => ’’,
      ’version’ => ’1.4.4’,
      )

      ’xtracontacts’ passed using rule: #LIST [email protected], [email protected],[email protected],[email protected],[email protected], ([email protected], [email protected])
      ’xtracontacts’ passed using rule: #LIST [email protected], [email protected],[email protected],[email protected],[email protected],[email protected], ([email protected])
      ’formid’ passed using rule: #VALUE sendmepol, (input=sendmepol)
      SESSION HASH:
      FORM HASH:d2e5f89efee4701704a39761096092d8
      Mail Headers:
      From: sendmewebsite@ ()
      Reply-to:[email protected]
      To: [email protected]
      Subject: This is a debug test!
      CC:
      BCC:


      I’m guess that cause the email addresses are all run together it’s not processing to the
      CC: Mail Header?!

        Paul AL Bakulich - Association for Computing Machinery Professional Member
        http://palbakulich.me/ | http://twitter.com/#!/palhmbs
        • 38685
        • 59 Posts
        Paul Bakulich Reply #3, 17 years ago
        Managed to get help from a friend who inserted
        on line 338 of eform.inc.php

        			$cc = implode (', ',$_POST['xtracontacts']);
        


        At least now I can carry on to the next step,
        implementing eform2db to store the submitted form for moderation !!
          Paul AL Bakulich - Association for Computing Machinery Professional Member
          http://palbakulich.me/ | http://twitter.com/#!/palhmbs
          • 38685
          • 59 Posts
          Paul Bakulich Reply #4, 17 years ago
          Just an improved version of the above to stop a parse error

          //check that won't make an parse error
          	if ((!isset($_POST['xtracontacts'])) OR (count($_POST['xtracontacts'])== 0)){
          		$cc = '';
          	}else{
          	 $cc = implode (', ',$_POST['xtracontacts']);
          	}



          This can be modified for any of the mail headers, as long as you have left them empty in the snippet call!

            Paul AL Bakulich - Association for Computing Machinery Professional Member
            http://palbakulich.me/ | http://twitter.com/#!/palhmbs