But I cannot figure out how to communicate from the website in order to send an email.
It is possible to replace
You can have a url endpoint where you send form data as POST body and handler of that url will do the rest of the work.
Thanks. Any examples or links that shows this?
How are you rendering contact page when you get “/contact” in url? Do the same but before sending back html, do the ops and depending on if the email was or wasn’t sent successfully send some message to your contact.html template and show contact page again with that message
I used in my projects gopkg.in/gomail.v2 for sending mails. An example using fields from a form is here.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.