Results 1 to 2 of 2

Thread: New user - Can't get email to send

  1. #1
    Join Date
    Aug 2013

    Default New user - Can't get email to send

    Hey guys,

    I just started (trying) to use FormMail and after following all documentation I still can't get formmail to email me when I submit my forms. I am building the site in dreamweaver with html5/css3. I don't have it up on a server yet (I am using localhost with xampp), but I will post the code below. FormMail is also supposed to email me all form errors, which it currently does not.

    Here is my code:

    HTML Code:
    <form id="lead" method="post" action="formmail.php" name="myform">
    <input type="hidden" name="good_url" value="index.html#submitgood" /><input type="hidden" name="bad_url" value="index.html#submitbad" /><input type="hidden" name="good_template" value="index.html#submitgood" /><input type="hidden" name="bad_template" value="index.html#submitbad" /><input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" /><input type="hidden" name="derive_fields" value="email=EmailAddr,realname=username" /><input type="hidden" name="mail_options" value="HTMLTemplate=mailtemplate.html" /><input type="hidden" name="recipients" value="myaddress" /><input type="hidden" name="subject" value="Retirement Autopilot PDF" />
    <fieldset><legend> Request a free PDF by filling out the form below</legend><br /><br />
    <label for="FullName" id="namelabel">Name</label><input id="FullName" type="text" name="username" placeholder="Your Name" autofocus required />
    <label for="eMail" id="emaillabel">Email</label><input id="eMail" type="email" name="EmailAddr" placeholder="" required /><br><br>
    <label for="dob" id="birthdate">Date of Birth</label><input id="dob" type="date" name="birthdate" placeholder="01/01/1900" />
    <label for="phone" id="tel">Phone</label><input id="phone" type="tel" name="userphone" placeholder="123-456-7890" /><br><br>
    <label for="state" id="stateres">State of Residence</label><input id="state" type="text" name="states" list="states" placeholder="Alabama" />
    <datalist id="states"><option value="North Carolina" /><option value="South Carolina" /><option value="Florida" /><option value="Georgia" /></datalist></label><br /><br />
    <input id="reset" type="reset" name="reset" value="Clear" /><input id="submit" type="submit" name="submit" value="Submit" /></fieldset></form>
    <!-- popup form #1 for good_url -->
    <a href="#x" class="overlay" id="submitbad"></a><div class="popup"><h2>Woops!</h2><p>Something went wrong</p><a class="close" href="#close"></a></div>
    <!-- popup form #2 for bad_url-->
    <a href="#x" class="overlay" id="submitgood"></a><div class="popup"><h2>Success!</h2><p>You will receive your free PDF in your inbox promptly</p><a class="close" href="#close"></a></div>

    PHP Code:

    $TARGET_EMAIL = array(EMAIL_NAME."^eric@broadcastingexperts\.com$");


    $TEMPLATEDIR "fmtemplates";  
    $TEMPLATEURL "fmtemplates/mailtemplate.html";               

    $FORM_INI_FILE "formmail.ini";


    HTML Code:
    <p>Here is the latest form submission about Retirement Autopilot:</p><table border="1"><tr>    <td>User's name:</td>    <td><b>$username</b></td></tr><tr>    <td>Email address:</td>    <td><b>$EmailAddr</b></td></tr><tr>    <td>Date of Birth:</td>    <td><b>$birthdate</b></td></tr><tr>    <td>Phone Number:</td>    <td><b>$userphone</b></td></tr><tr>    <td>State:</td>    <td><b>$states</b></td></tr></table>

    required = "realname,subject,email"
    myaddress = ""

    Thanks in advance to anyone who can help me get everything up and running. I'm sure i am making a simple mistake somewhere in there, but I can't see it!


    I am suspicious of this line "<input type="hidden" name="mail_options" value="HTMLTemplate=mailtemplate.html" />". My email template is in a folder called "fmtemplates" and I tried writing it as "HTMLTemplate=fmtemplates/mailtemplate.html" but that still didn't work.

    EDIT 2:

    I am also suspicious of "<input type="hidden" name="derive_fields" value="email=EmailAddr,realname=username" />" because when I remove this the form displays my fail message. Perhaps I need more values for the other fields in my form (date of birth, phone number, state of residence)?? I don't know how to do that though.
    Last edited by warnakey; 05-Aug-2013 at 05:58 PM. Reason: additional thoughts

  2. #2
    Join Date
    Aug 2013

    Default Re: New user - Can't get email to send

    After I uploaded my website to GoDaddy and updated the links everything worked perfectly. Check it out,

    This is a client's website by the way, not mine.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. User email with fields
    By msealey in forum Community Support
    Replies: 5
    Last Post: 22-Oct-2011, 04:20 AM
  2. Replies: 5
    Last Post: 01-Mar-2011, 08:37 PM
  3. Send to email address specified by the user
    By ashuva in forum Community Support
    Replies: 0
    Last Post: 16-Feb-2011, 03:32 PM
  4. Copying email to the User
    By IainY in forum Community Support
    Replies: 2
    Last Post: 31-Jul-2009, 12:12 PM
  5. Email Validation, Send confirm email to end user. Error Messeging
    By PoorSiteCreator in forum Community Support
    Replies: 0
    Last Post: 05-May-2009, 03:39 AM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts