1

task:

  • create form "contact us"

  • send data from the form to 2 Email addresses

I created form but magento 2 does not provide option in admin to add multiple emails separated by ,

enter image description here

I was looking for a solution to the problem and found a way: completely rewrite the contact form saveing controller and give it your transport method in which you need to assign the number of additional emails

if someone came across such or similar implementation, please help with an example

add

enter image description here

enter image description here

2

1 Answer 1

0

One quick way to add multiple email address in this field is same as I do in M1 just remove the validate-email class from the field (by inspect element) then add multiple emails , separated. and press save.

Look first class validate-email remove it manually & save with multiple emails: enter image description here It will work, I will look proper free solution for it and post it here. Let me know if its still not working for you.

9
  • if you remove the validation, it will only send to the first mail Sep 20, 2019 at 7:20
  • No not at all this validation is not for this purpose. It will send to all emails separated by comma. This validation is just for to enter correct email address Sep 20, 2019 at 7:21
  • Can you tell me how to remove validation? Sep 20, 2019 at 11:06
  • just inspect element on text box and remove validate-email class Sep 20, 2019 at 11:10
  • 1
    5.1.2 The recipient address <[email protected] [email protected] 5.1.2 > is not a valid RFC-5321 address. m21sm455969lfh.39 - gsmtp Sep 20, 2019 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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