AjaxForm SMTP Not sending

When i`m sending an email through php snippet it working correctly.
but when I use ajaxform / formit, the email does not come and the logs are empty.
AjaxForm code:

[[!AjaxForm?
&snippet=FormIt
&form=gre4ka-form
&hooks=spam,email
&emailSubject=Вам сообщение с сайта [[++site_name]]
&emailTo=gre4kaover@gmail.com
&emailFrom=[[++mail_smtp_user]]
&emailTpl=gre4ka-tpl
&validate=name:required,email:email:required,text:required:stripTags,phone:required
]]

HTML form:

<div class="form-group">
    <label class="control-label" for="af_name">[[%af_label_name]]</label>
    <div class="controls">
        <input type="text" id="af_name" name="name" value="[[+fi.name]]" placeholder="" class="form-control"/>
        <span class="error_name">[[+fi.error.name]]</span>
    </div>
</div>

<div class="form-group">
    <label class="control-label" for="af_email">[[%af_label_email]]</label>
    <div class="controls">
        <input type="email" id="af_email" name="email" value="[[+fi.email]]" placeholder="" class="form-control"/>
        <span class="error_email">[[+fi.error.email]]</span>
    </div>
</div>

<div class="form-group">
    <label class="control-label" for="af_message">[[%af_label_message]]</label>
    <div class="controls">
        <textarea id="af_message" name="message" class="form-control" rows="5">[[+fi.message]]</textarea>
        <span class="error_message">[[+fi.error.message]]</span>
    </div>
</div>

<div class="form-group">
    <div class="controls">
        <button type="reset" class="btn btn-default">[[%af_reset]]</button>
        <button type="submit" class="btn btn-primary">[[%af_submit]]</button>
    </div>
</div>

[[+fi.success:is=`1`:then=`
<div class="alert alert-success">[[+fi.successMessage]]</div>
`]]
[[+fi.validation_error:is=`1`:then=`
<div class="alert alert-danger">[[+fi.validation_error_message]]</div>
`]]

It looks like “text” is a required field, but it is not in the form. i think “message” is the correct field instead.

1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.