I'm using the following form, and occasionally through testing the e-mail activation link will send, however the majority of time it never gets sent. Did I do something wrong with the form?

<form method="post" accept-charset="UTF-8">
        {{ getCsrfInput() }}
        <input type="hidden" name="action" value="users/saveUser">
        <input type="hidden" name="redirect" value="/success/">

        {% macro errorList(errors) %}
            {% if errors %}
                <ul class="errors">
                    {% for error in errors %}
                        <li>{{ error }}</li>
                    {% endfor %}
            {% endif %}
        {% endmacro %}

        {% from _self import errorList %}

        <h3><label for="username">Username</label></h3>
        <input id="username" type="text" name="username"
            {%- if account is defined %} value="{{ account.username }}"{% endif -%}>

        {% if account is defined %}
            {{ errorList(account.getErrors('username')) }}
        {% endif %}

        <h3><label for="email">Email</label></h3>
        <input id="email" type="text" name="email"
            {%- if account is defined %} value="{{ account.email }}"{% endif %}>

        {% if account is defined %}
            {{ errorList(account.getErrors('email')) }}
        {% endif %}

        <h3><label for="password">Password</label></h3>
        <input id="password" type="password" name="password">

        {% if account is defined %}
            {{ errorList(account.getErrors('password')) }}
        {% endif %}

        <input type="submit" value="Register">
  • The form looks fine. If you turn on debug mode and look at your craft.log you should be able to see if craft attempted to send an email or not, or if there was an error. Might also check that they're not getting spam filtered. The 'testToEmailAddress' in your config file is also useful. – Douglas McDonald Feb 26 '15 at 9:04

If you're using phpmail or sendmail under Settings->Email in the control panel, they are notoriously unreliable at delivering emails consistently.

Try using a proper SMTP relay or a transactional email provider like Mandrill.

| improve this answer | |
  • Recently I discovered mailjet. 6000 mails per moth for free. – Martijn La Feber Nov 5 '17 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.