So I'm building a small website and i need to create a html form where the values would be sent to my client's email.
The form code:
<form id="contact-form" method="POST" action="form-to-email.php" role="form">
<div class="messages"></div>
<div class="controls">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="form_name">Name *</label>
<input id="form_name" type="text" name="name" class="form-control" placeholder="Please enter your Name *" required="required" data-error="Firstname is required.">
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="form_email">Email *</label>
<input id="form_email" type="email" name="email" class="form-control" placeholder="Please enter your Email *" required="required" data-error="Email is required.">
<div class="help-block with-errors"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="form_social">Other Socials</label>
<input id="form_social" type="text" name="other_socials" class="form-control">
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="form_need">Services</label>
<select class="form-select" aria-label="Default select example" name="services">
<option selected>Select a Service</option>
<option value="Live2D Vtuber Rigging">Live2D Vtuber Rigging</option>
<option value="Animation">Animation</option>
<option value="Illustration">Illustration</option>
<option value="Graphics">Graphics</option>
<option value="Others">Others</option>
<option value="General Enquiry">General Enquiry</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="form_message">Message *</label>
<textarea id="form_message" name="message" class="form-control" placeholder="Message for me *" rows="4" required="required" data-error="Please, leave us a message."></textarea>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-12">
<input type="submit" class="btn btn-success btn-send" value="Send message">
</div>
</div>
</div>
</form>
I'm using basic HTML/JS and php.
I've tried this example but I have an error 405 which I assume from another answer is due to me using a localhost (using MAMP localhost).
Friend suggested using Google smtp but i'm totally lost as i'm a beginner to frontend, so i'm not sure where to start.
I did some resaerch and there was suggestion to use PHPmailer but i'm not even sure how to intergrate it with my code?
Any suggestions on where to start off?