We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26621
    • 9 Posts
    hi all,

    since i’m new to revo (after months of evo and eform) please excuse my possible newbie approach wink

    i didn’t get formit to work, the error message in the log always states "You must provide an email address to send to." although i’m using the &emailTo=`[email protected]` parameter. when calling "[[!FormIt]]" without question mark i could repress the error message, but no mail is sent out.

    the first thing i checked was if the php-mail () function is working - it is.
    the second thing i tried was the smtp option - same error message and to mail sent.
    my third measure was to do a research in this forum, some people are having this problem too, but there appears to be no explanation or fix to it huh

    now i’m confused.

    i would be very grateful for any helping comment smiley
      • 17786
      • 9 Posts
      having the same problem. Running Revo 2.0 on MAMP 1.91 with PHP 5.3.2. Page redirects correctly to the "thanks" page specified in the redirect hook, but no email sent. In the log I have the same error -- you must specify an email address.

      help...
        • 5340
        • 1,624 Posts
        Can you both post more details about your snippet calls and how you call them? I don’t have this problem
          • 26621
          • 9 Posts
          Quote from: cipa at Sep 02, 2010, 09:07 PM

          Can you both post more details about your snippet calls and how you call them? I don’t have this problem

          I use the SMTP option now, and it’s working. But in order to solve the basic problem, that’s the code that still is not working w/o STMP:

          [[!FormIt? &hooks=`email` &emailTpl=`MyEmailChunk` &emailTo=`[i]myvalidemailadress[/i]@mac.com` &redirectTo=`8` ]]
          
          [[+fi.error.error_message]]
          <form class="form" action="[[~[[*id]]]]" method="post">
              <input name="nospam:blank" type="hidden" />
              <label for="name">        Name:        <span class="error">[[+fi.error.name]]</span>    </label>    <input id="name" name="name:required" type="text" value="[[+fi.name]]" /><br />
              <label for="email">        Email:        <span class="error">[[+fi.error.email]]</span>    </label>    <input id="email" name="email:email:required" type="text" value="[[+fi.email]]" /><br />
              <label for="subject">        Subject:        <span class="error">[[+fi.error.subject]]</span>    </label>    <input id="subject" name="subject:required" type="text" value="[[+fi.subject]]" /><br />
              <label for="text">        Message:        <span class="error">[[+fi.error.text]]</span>    </label>    <textarea id="text" cols="55" rows="7" name="text:required:stripTags">[[+fi.text]]</textarea>
              <br class="clear" />    [[!+formit.recaptcha_html]]    [[+fi.error.recaptcha]]
              <br class="clear" />
          <div class="form-buttons">        <input type="submit" value="Send Contact Inquiry" />    </div>
          </form>
            • 5340
            • 1,624 Posts
            I get "You must provide an email address to send to." error message in the Error Log when MyEmailChunk doesn’t exist.
            In my case email still gets sent but it doesn’t contain a thing. I also see that these emails are moved directly into the spam folder.

            Another thing is that your host might not allow certain types of mail headers. When you add the SMTP settings the mail goes through probably because of the different mail headers.

            Sorry, but I can’t give you an exact answer

            PS: I tested this on a newer version of Revolution taken from GIT


              • 17786
              • 9 Posts
              Curiously, I got this to work. MODx is sending email correctly, and I can manipulate the email chunk to say exactly what I want it to. BUT even when the email gets sent, the error log is still reporting that "you must provide an email address." So in my case it appears that the presence of that item in the log has nothing to do with whether the snippet is properly configured or not -- I’m getting the same error message anyway.
                • 22548
                • 58 Posts
                I was having the same issue: No emails were sent via FormIt, and I received the ominous "You must provide an email address to send to" error message, although I had specified the address with &emailTo (and I did not forget to add the "MyEmailChunk").

                Finally I got it to work laugh (just by accident) after changing mail_use_smtp from "Yes" to "No" in the system settings huh.

                But: I am on GoDaddy shared, which for sending e-mail requires to specify smtpout.secureserver.net as smtp server, my email address/username and password, as far as I understand.

                So, if MODx ist not using SMTP, how is it sending mail at all? I am not using the SMTP snippet call from the docs example either, just
                [[!FormIt? &hooks=`email` &emailTpl=`MyEmailChunk` &emailFrom=`[email protected]` &emailTo=`[email protected]`]]


                Sorry for asking such noob questions, but I really would like to understand this MODx e-mail magic. Would anybody bother to share their knowledge?

                Thank you and my best greetings,
                Alex
                  • 1778
                  • 659 Posts
                  I think MODx uses the PHP mail()...
                    • 22548
                    • 58 Posts
                    Wow, that’s quick, thanks for sharing, anso!
                    So which mailserver does MODx actually use then (again sorry for my missing knowledge, I guess this is really basic stuff)? Could this effect email delivery as well (as there is no authentication)?
                    Alex

                      • 22548
                      • 58 Posts
                      I tried to figure this out, and if I understood it correctly, PHP mail() uses the SMTP server indicated in my PHP.ini, is that right?

                      If this is so, there is no authentication, or is there? Will providers accept such mails anytime then? And is this safe against header injection (I suppose MODx has validation inbuilt here as well), or would you advise to get FormIt running without PHP mail()?

                      Thanks for any help,
                      Alex