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

    I keep getting this error when I try to send the form:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error: 	mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	E:\hshome\arterial\arterial.com.au\microsite\manager\includes\controls\class.phpmailer.php	 
      Line: 	438	 
      Line 438 source: 	$rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header); 	 
     
    Parser timing
      MySQL: 	0.0052 s	(0 Requests)
      PHP: 	0.0500 s	 
      Total: 	0.0552 s	 


    This is my snippet call:

    [!eForm? &formid=`contactForm` &to=`[email protected]` &tpl=`eContactForm` &report=`eContactFormReport` &thankyou=`eContactFormThanks` &vericode=`1` &subject=`Message from website`!]


    This is my template for the form:

    <p>To contact us please fill out the details below.</p>
    <p><span style="color:#900;">[+validationmessage+]</span></p>
    <form method="post" enctype="multipart/form-data" action="[~[*id*]~]">
        <input type="hidden" name="formid" value="contactForm" />
        <p><label accesskey="n" for="Name">Your Name:</label><br />
        <input type="text" name="Name" maxlength="60" eform="Your Name::1" /></p>
    
        <p><label accesskey="e" for="email">Your Email Address:</label><br />
        <input type="text" name="email" size="40" maxlength="40" eform="Your Email Address:email:1" /></p>
        
        <p><label accesskey="c" for="comments">Comments:</label><br />
        <textarea cols="40" rows="10" name="comments" eform="Comments:html:1"></textarea></p>
    
            <p>Please enter the anti spam code below:</p>
           <p>
         <img src="[+verimageurl+]" alt="verification code" border="1"/>
         </p>
    <p>
          <label accesskey="c" for="vericode">code</label></p>
    <p>
          <input type="text" name="vericode" size="20" />
          </p>
    <p>
    <input type="submit" name="frmGo" value="Send contact form" />
    </p>
    </form>
        


    This is my template for the report:

    <p>Below is the contents of a contact form sent from the website:</p>
    <table>
    <tr><td>Name:</td><td>[+Name+]</td></tr>
    <tr><td>Email address:</td><td>[+email+]</td></tr>
    <tr valign="top"><td>Comments:</td><td>[+comments+]</td></tr>
    
    </table>


    This is my template for thank you message:

    <h3>Thank you for your contacting us.</h3>
    <p>A member of our staff will be in contact with you very shortly.</p>
    <p>Below is a copy of your message:</p>
    <table>
    <tr><td><p>Your name:</p></td><td><p>[+Name+]</p></td></tr>
    <tr><td><p>Your email address:</p></td><td><p>[+email+]</p></td></tr>
    <tr valign="top"><td><p>Your comments:</p></td><td><p>[+comments+]</p></td></tr>
    </table>


    Please help!

    Thanks,

    sarah


      • 36592
      • 970 Posts
      What is your ’From:’ address for this e-mail ?
      And can it be acceptable by your SMTP server ?
        • 26182
        • 164 Posts
        i put a from parameter in ie

        [!eForm? &formid=`contactForm` &to=`[email protected]` &from=`[(email)]` &tpl=`eContactForm` &report=`eContactFormReport` &thankyou=`eContactFormThanks` &vericode=`1` &subject=`Message from Ferrograd website`!]


        and it still issues the same error.

        if it’s a server side error, how do i phrase my request?

        thanks for your help.

        cheers,

        sarah
          • 36592
          • 970 Posts
          [!eForm? &formid=`contactForm` &to=`[email protected]` &from=`[(email)]` &tpl=`eContactForm` &report=`eContactFormReport` &thankyou=`eContactFormThanks` &vericode=`1` &subject=`Message from Ferrograd website`!]

          What is the value of [(email)] ?
          I am suspecting the domain of this value is rejected by SMTP server for the security reason...
            • 26182
            • 164 Posts
            It’s supposed to be the email address for the modx instance. I changed them both to me email and I still get the same error.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              [(email)] the system value needs to be [(emailsender)] (that’s what it is named in the database).
                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
                • 26182
                • 164 Posts
                Ok I found out what the error was - had to hardcode some stuff in the phpmailer file including the most crucial - an email address that is sent that the server can recognize.

                Hope this helps someone!

                Yay!

                Thanks for all your help.

                Sarah smiley
                  • 30456
                  • 37 Posts
                  I have the same problem. Could you write me down the solution if possible
                    • 17851
                    • 213 Posts
                    I’m having the same issue I think. What needs to be configured in PHP mail? Or sendmail? Or SMTP?
                      Mark Macatee
                      President
                      Power 10 Solutions
                      http://www.power10solutions.com
                      • 26182
                      • 164 Posts
                      do you have an email address configured on the server?

                      ie [email protected]?

                      you need to get this setup if you don’t and then you need to find out what the mail host address is.

                      let me know how you go.

                      sarah