Hi
A client is not receiving emails from the contact form. It's using databound forms and I can see the form submissions in the couchcms side.
The client is using Google Workspace which is new to me and using databound forms is new to me as well but would I need to use phpmailer addon or something so they get the email.
The correct email address is set in the config.php file and they have checked their junk and spam folders but is nothing there.
Below is the code for contact.php
Thank you in advance
A client is not receiving emails from the contact form. It's using databound forms and I can see the form submissions in the couchcms side.
The client is using Google Workspace which is new to me and using databound forms is new to me as well but would I need to use phpmailer addon or something so they get the email.
The correct email address is set in the config.php file and they have checked their junk and spam folders but is nothing there.
Below is the code for contact.php
- Code: Select all
<cms:set submit_success="<cms:get_flash 'submit_success' />" />
<cms:if submit_success >
<div class="alert alert-success">
<h4 class="text-dark"><strong class="text-dark">Success:</strong> Your form has been submitted.</h4>
</div>
</cms:if>
<cms:form
masterpage=k_template_name
mode='create'
enctype='multipart/form-data'
method='post'
anchor='0'
id='contact_form'
>
<cms:if k_success >
<cms:send_mail from=k_email_from to=k_email_to reply_to=frm_email subject='New Website Enquiry'>
The following is an contact form enquiry sent by a visitor on the contact page:
Name: <cms:show frm_name/>
<br>
Email: <cms:show frm_email/>
<br>
Phone: <cms:show frm_phone/>
<br>
Service Type: <cms:show frm_service_type/>
<br>
Message: <cms:show frm_message/>
<br>
Agree to privacy policy: <cms:show frm_agree/>
</cms:send_mail>
<cms:send_mail from='no-reply@hybrid-it.co.uk' to="<cms:show frm_email />" subject='Privacy Policy Consent Confirmation'>
Hello <cms:show frm_name />,
You recently submitted an inquiry via our website and confirmed that you have read and agreed to our Privacy Policy.
Submission Details:
- Name: <cms:show frm_name />
<br>
- Email: <cms:show frm_email />
<br>
- Date & Time: <cms:date format='d-m-Y \a\t H:i:s' />
<br><br>
If you did not submit this request, please contact us.
Regards,
Hybrid IT Services
</cms:send_mail>
<cms:db_persist_form
_auto_title='1'
_invalidate_cache='0'
/>
<cms:set_flash name='submit_success' value='1' />
<cms:redirect k_page_link />
</cms:if>
<div class="row g-4">
<div class="col-lg-12">
<div class="field-set">
<cms:input id="name" name="name" class="form-control" placeholder="Your Name" type="bound" />
</div>
<div class="field-set">
<cms:input id="email" name="email" class="form-control" placeholder="Your Email" type="bound" />
</div>
<div class="field-set">
<cms:input id="phone" name="phone" class="form-control" placeholder="Your Phone" type="bound" />
</div>
<div class="field-set">
<cms:input id="service_type" name="service_type" type="bound" class="form-control" />
</div>
<div class="field-set">
<cms:input id="message" name="message" class="form-control h-100px" placeholder="Your Enquiry" type="bound" />
</div>
<div class="field-set">
<cms:input id="agree" name="agree" type="bound" />
<br>
<a href="privacy-policy.php" target="_blank">Read Privacy Policy</a>
</div>
</div>
</div>
<div id='submit' class="mt-3">
<cms:if "<cms:not submit_success />" >
<input type='submit' id='send_message' value='Send Message' class="btn-main">
</cms:if>
</div>
</cms:form>
Thank you in advance