We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25322
    • 78 Posts
    I am trying to make a contact form with eform on my site.. i have read tutorials in the wiki and documentation but followed this small tutorial on one of the posts in the forum but i am getting an error when sending the email. I have followed the tutorial step by step.

    Step 1. Create the form and place it in a chunk called ’eFeedbackForm’
    <p><span style="color:#900;">[+validationmessage+]</span></p>
    <form method="post" action="[~[*id*]~]">
    <input type="hidden" name="formid" value="feedbackForm" />

    <p><label accesskey="n">Your Name</label>
    <input type="text" name="Name" maxlength="60" eform="Your Name::1" /></p>

    <p><label accesskey="e">Your Email Address</label>
    <input type="text" name="email" size="40" maxlength="40" eform="Your Email Address:email:1" /></p>

    <label accesskey="s">Subject</label>
    <select name="subject">
    <option value="Feedback">Website feedback</option>
    <option value="Support request">Support request</option>
    <option value="Feature Request">Feature request</option>
    </select>

    <p><label accesskey="c">Comments</label>

    <textarea cols="40" rows="10" name="comments" eform="Comments:html:1"></textarea></p>

    <p><label">Would you like to be on our mailling list?</label>
    <input type="radio" name="list" value="Yes" eform="Mailling List::0:" /> Yes&nbsp;
    <input type="radio" name="list" value="No" /> No&nbsp;</p>

    <p>
    Please enter the verification code below: (to prevent spam)

    <img src="[+verimageurl+]" alt="verification code" />

    <input type="text" name="vericode" size="20" />
    </p>

    <p><input type="submit" name="submit" value="Send Feedback"></p>
    </form>

    step 2 Created an email template (the report template) and place it in a chunk. ’eFeebackReport’

    <p>This is a response sent by [+Name+] using the feedaback form on the website. The details of the mesage follow below:</p>
    <table>
    <tr valign="top"><td>Name:</td><td>[+Name+]</td></tr>
    <tr valign="top"><td>Email:</td><td>[+email+]</td></tr>
    <tr valign="top"><td></td><td>[+subect+]</td></tr>
    <tr valign="top"><td>comments:</td><td>[+comments+]</td></tr>
    </table>
    <p>Would [+name+] like to be on our mailing list? <strong>[+list+]</strong></p>

    <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE:[+subject+]">[+email+]</a></p>


    Step 3 Created the thank you page with id=34

    step 4 This is the snippet i placed in my template.


    [[eForm? &formid=`feedbackForm` &to=`[email protected]` &tpl=`eFeedbackForm` &report=`eFeedbackReport` &gotoid=`34` &vericode=`1`]]

    I get this error when i try to send a email ...

    « MODx Parse Error »

    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing
    Error type/ Nr.: Warning - 2
    File: C:\Home\a\a\amusssas\www\manager\includes\controls\class.phpmailer.php
    Line: 438
    Line 438 source: $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);

    Parser timing
    MySQL: 0.0102 s (5 Requests)
    PHP: 0.1508 s
    Total: 0.1610 s


    any help greatly appreciated. thanks
      • 31133
      • 22 Posts
      I think it might help if you try first the php mail() function in a small .php file.

      <?php
      mail("[email protected]","bla bla","bla bla");
      ?>

      If it doesn’t work then it’s not a problem of modx, it’s a problem of configuration of your mail server.

      I hope it will help a bit.

      Bye