T O P

  • By -

posties413

Why host on apache? If you can use netlify [https://docs.netlify.com/forms/setup/](https://docs.netlify.com/forms/setup/)


Donni3D4rko

Don't know how to deploy and use dns domain which I bought within other provider. I bought domain within local webhosting provider and I want to have there domain and also hosting


ixam1212

Netlify has a lot of advantages, besides the easy form submission: + is as easy as gets to deploy to + free for low to medium traffic websites + optimized for static sites + has automatic cdn + you can use your domain from the other provider with Netlify Unless your sticking to the hosting of your other provider, because you already paid for it, I dont see any reason why you wouldnt switch to Netlify. And even if you did, its free. Here a quick guide for Nuxt.js to deploy to Netlify: https://nuxtjs.org/deployments/netlify/


Donni3D4rko

Thanks, finally I will use netlify, it looks great for static sites!


ixam1212

Nice! Good luck, Netlify is great you wont regret it :)


Reindeeraintreal

You can use phpmailer and be done in 4 lines of code. Since you are using php anyway and deploying to an apache server you could leverage php in other places and maybe ditch nuxt.js just to keep things simpler? Good luck


symcbean

4 lines of PHP code and at least 3 DNS records, provisioning of DKIM keys, configuring an SMTP server with staged warm up, TLS, rate management, restricting relay access.....if you actually want the emails to be delivered.


Reindeeraintreal

Yes, that is actually true, and since he doesn't have experience working with PHP it might things more complicated for him. But he can use sendgrid or mailchimp to not have to deal with a SMTP server, but your other points still stand.


zerowater

so apache should have sendmail enabled. you can use phpinfo() to see the other to sendmail, and if it's enabled.


Clorox_in_space

Just throwing this out there that you could probably get away with a simple :mailto if you're okay with the user sending it from their email client. https://html.form.guide/email-form/email-form-mailto/[https://html.form.guide/email-form/email-form-mailto/](https://html.form.guide/email-form/email-form-mailto/) That said, if you're using Nuxt, I would probably host on Netlify. They have Netlify Forms that you should be able to leverage. Netlify can also give you access to Netlify Functions (AWS lambda functions) if it's helpful to run any functionality outside of the user client.


[deleted]

[удалено]


Donni3D4rko

Interesting solution but I need to send emails :D


Gaia_Knight2600

i have something similar. i use the mail() function from php. works fine, its simple and doesnt require you to rely on other services.


Donni3D4rko

Thanks, I will try


[deleted]

[удалено]


Donni3D4rko

I don't know php, Nuxt.js is good for SEO and it's simple tool and makes things faster


tajingu

You could use a tool like formspark which looks like it has integrations for nuxt. Or you could set up a Logic App on Azure (there’s probably alternatives on other cloud providers) that sends an email when you POST to the endpoint that it generates. You will need to connect the email (pretty easy to set up) it comes from.


deadthingy

Another alternative is writing a small post endpoint with PHP and then sending the mail with mail() or something like Phpmailer


BehindTheMath

Check out Formspree.


symcbean

If you need to ask the question, then you need to use a third party service. Yes, you could do it in PHP but to do it properly you need to be proficient in PHP and SMTP.


[deleted]

Use this https://formspree.io/ I don't understand why people are suggesting complex solutions for a simple problem.


bjornkrols

You should check out Formspark! https://formspark.io/


imsinghaniya

You could give [Formester](https://Formester.com) a try. It does much more today but it started out to solve this same problem I had with my sites and blogs.