We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45479
    • 18 Posts
    I've spent the last hours on this but I'm close to giving up ...

    I want to realize a simple "subscribe to newsletter" function. So I installed Eletters and the required FormIt. This is the standard chunk I slightly modified.

    <!--
    * FormIt is required!
    * Fields used: firstname, lastname, company, email
    * Optional: m_name, company, address, state, zip, country, phone, cell, crm_id
    * The 'EletterSignup' hook (snippet) adds the subscriber or returns an error message.
    * Optionally redirect to a 'thankyou' page!
    * You can also use this in a "normal" contactform.
    -->
    
    [[!FormIt? 
      &hooks=`spam,EletterSignup,redirect` 
      &redirectTo=`37` 
      &validate=`email:required:email,first_name:required,last_name:required` 
      &confirmPage=`38` 
      &emailSubject=`Newsletter confirmation`
      &emailReplyTo=`[[++eletters.replayEmail]]`
      &emailFromName=`[[++eletters.fromName]]`
      &emailFrom=`[[++eletters.fromEmail]]`
      &emailTpl=`EletterSignupMail`
    ]]
    
    <form action="[[~[[*id]]]]" method="post">
    <ul>
        <li>
            <label for="txt_first_name">First name</label> <span class="error">[[!+fi.error.first_name]]</span>
            <input name="first_name" type="text" value="[[+fi.first_name]]" id="txt_first_name" />
        </li>
        <li>
            <label for="txt_last_name">Last name</label> <span class="error">[[!+fi.error.last_name]]</span>
            <input name="last_name" type="text" value="[[+fi.last_name]]" />
        </li>
        <li>
            <label for="txt_email">E-mail Address</label> <span class="error">[[!+fi.error.email]]</span>
            <input name="email" type="text" value="[[+fi.email]]" id="txt_email" />
        </li>
        <li>
            <input type="submit" value="Subscribe" />
        </li>
    </ul>
    </form>


    Result: the subscriber gets subscribed but doesn't recieve a confirmation email. The log returns "Eletters->Signup() - An error occurred while trying to send the confirmation email to [email protected]".

    I found some posts regarding this issue but there was no solution besides checking the SMTP setting. But a test with QuickEmail was positive and I revieved that email.

    [[!QuickEmail? &debug=`1`]]


    Any ideas? Would be appreciated very very much!