When the client uses the contact form, how can I get a confirmation email to the user?
Magento – How to send an Email confirmation after contact us
contact-formemailmagento2
contact-formemailmagento2
When the client uses the contact form, how can I get a confirmation email to the user?
Best Answer
I think your need to send some Email confirmation to the user when he/she send a contact form !
Lest's go, we will use an observer for that with
controller_action_postdispatch_contact_index_post
as event.In your module you have to add these 4 files, you replace
{Vendor}/{Module}
with you vendor, module name.app/code/{Vendor}/{Module}/Observer/SendContactConfirmationEmail.php
app/code/{Vendor}/{Module}/etc/events.xml
app/code/{Vendor}/{Module}/etc/email_templates.xml
app/code/{Vendor}/{Module}/view/frontend/email/email_template.html
A Content :
app/code/{Vendor}/{Module}/Observer/SendContactConfirmationEmail.php
app/code/{Vendor}/{Module}/etc/events.xml
app/code/{Vendor}/{Module}/etc/email_templates.xml
app/code/{Vendor}/{Module}/view/frontend/email/email_template.html
Good luck.