We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • @TobyL,

    Shouldn’t &cc work at the same time as &to ? ... I have been defining emails in &cc, but not receiving them. I am, however, receiving emails if I comma delimit in the &to param huh ...Just nothing via cc seems to get sent?

    If I passed
    &noemail=`false`
    , would it still mail? Technically, if I define the param, but setting the boolean value to false I would expect that it would. Have you done any testing with this type of a setup?
      Mike Reid - www.pixelchutes.com
      MODx Ambassador / Contributor
      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
      ________________________________
      Where every pixel matters.
    • Not sure if this is relevant, depends on how the snippet is implemented, but in general, all snippet parameters are treated as strings, and the string ’false’ will evaluate logically to a boolean true. Try passing `0` instead of false, which will evaluate to boolean false, even as a string.
      • I will have to try this out...
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
          • 30223
          • 1,010 Posts
          Quote from: pixelchutes at Nov 16, 2006, 06:47 PM

          @TobyL,

          Shouldn’t &cc work at the same time as &to ? ... I have been defining emails in &cc, but not receiving them. I am, however, receiving emails if I comma delimit in the &to param huh ...Just nothing via cc seems to get sent?

          If I passed
          &noemail=`false`
          , would it still mail? Technically, if I define the param, but setting the boolean value to false I would expect that it would. Have you done any testing with this type of a setup?

          I just did a quick test on one of my servers and I am indeed experiencing the same. &cc emails don’t arrive, however looking through the eForm source, and printing out some debug info, I can’t see anything wrong, the variables seem to get passed on to phpmailer ok. Will have to investigate this further as soon as I have time. Let me know if you find anything in the mean time...

          • `1` and `0` seem to work better than `true` and `false` in snippet parameters for some reason.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
            • Quote from: sottwell at Nov 17, 2006, 05:42 AM

              `1` and `0` seem to work better than `true` and `false` in snippet parameters for some reason.

              Per OpenGeek, all snippet parameters are treated as strings, and the string ’false’ will evaluate logically to a boolean true.

                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
              • Quote from: pixelchutes at Nov 17, 2006, 10:31 PM

                Quote from: sottwell at Nov 17, 2006, 05:42 AM

                `1` and `0` seem to work better than `true` and `false` in snippet parameters for some reason.

                Per OpenGeek, all snippet parameters are treated as strings, and the string ’false’ will evaluate logically to a boolean true.

                I am still experiencing mail being sent when not desired, passing 1 or 0...I believe this code is overriding it:

                //<?php
                    noemail => isset($noemail)? true:false,
                


                I’m going to change it to:

                //<?php
                    noemail => isset($noemail)? 1:0,
                


                OR Maybe this would be better:

                //<?php
                    noemail => isset($noemail)? $noemail:0,
                


                Update: Hmm...I tried both, and was receiving similar results....It turns out, I had to modify the core in order to get emails to drop:

                In my eform.inc.php (Approx. Line # 424), I changed:
                //<?php
                if( !$noemail ) {
                

                TO
                //<?php
                if($noemail!=false) {
                
                  Mike Reid - www.pixelchutes.com
                  MODx Ambassador / Contributor
                  [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                  ________________________________
                  Where every pixel matters.
                  • 30223
                  • 1,010 Posts
                  I am still experiencing mail being sent when not desired, passing 1 or 0...I believe this code is overriding it:
                  Code:

                  //<?php
                      noemail => isset($noemail)? true:false,


                  This could certainly use a bit of improvement. As it is, regardless what value you set the &noemail parameter to, the result is that $noemail is set to a boolean TRUE and according to the code if($noemail) { no email should be sent out... I’m surprised this parameter doesn’t seem to work for you. I use it all the time when testing my forms.


                  OR Maybe this would be better:

                  Code:
                  //<?php
                      noemail => isset($noemail)? $noemail:0,

                  Definitively the better way to go but to get a true boolean value I’d change it to:
                  //<?php
                      noemail => isset($noemail)? $!(!$noemail):false,

                  By negating $noemail (twice) it is forced to a true boolean value.

                  Update: Hmm...I tried both, and was receiving similar results....It turns out, I had to modify the core in order to get emails to drop:

                  if( $nomail != false ) evaluates to TRUE if $noemail is TRUE
                  if( !$nomail ) evaluates to TRUE if $noemail is FALSE

                  You’ve basically reversed the test... smiley which means you might get some unexpected behaviour in other forms.

                  However I’ve just reviewed the eForm code and there’s some anomaly with $noemail. Around line 395 there’s a test for $nomail (missing e) which is set depending on if there’s a valid To: address. These two vars should really be one and the same and it could make all the difference in your case. I’ve made a note to review this for the next point release.
                  • LoL...luckily we’ll only be using the one form for this site... I feel like I have a few jimmy-rigged copies of eForm scattered about, and am excited about updating the core code with the next stable release. eForm 2.0 (Class) sounds very exciting, too!
                      Mike Reid - www.pixelchutes.com
                      MODx Ambassador / Contributor
                      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                      ________________________________
                      Where every pixel matters.
                      • 7455
                      • 2,204 Posts
                      any progress on this ? even when I set &to and &cc and &bcc , only &to and &bcc arive in my mailbox.

                      Is there a fix for this?

                      when I us the phpmailerclass outsite Eform in a custom snippet cc works just fine.
                        follow me on twitter: @dimmy01