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
      • 25322
      • 78 Posts
      Help would be greatly appreciated
        • 36416
        • 589 Posts
        Quote from: rob21 at Mar 08, 2007, 10:28 PM

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

        Error: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing

        This looks like something is tripping PHPmailer e-mail header parsing... I don’t know eForm snippet intimately but it is probably missing &subject parameter in snippet call or empty "Email address" field in Tools|Configuration|User.
          • 25322
          • 78 Posts
          Cheers for the response. I’m not sure if thats the problem. Email address is filled in the configuration. I also made a separate contact form from the tutorial in the eform snippet section in the wiki and its given me this error when i click send mail.


          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.0075 s (5 Requests)
          PHP: 0.1528 s
          Total: 0.1603 s

          Any other ideas?
            • 25322
            • 78 Posts
            I also set up a brand new test site with the default template that comes with modx. This has a contact form built into it. I set up my email address in the manager/configuration/user and tried to send an email. Get the following error again.

            « 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\n\t\ntds\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.0178 s (18 Requests)
            PHP: 0.2340 s
            Total: 0.2518 s


            Any help would be appreciated