0

Here's my code for my new website

                                    <div class="single_contant_left">
                                        <form action="#" id="formid">
                                            <!--<div class="col-lg-8 col-md-8 col-sm-10 col-lg-offset-2 col-md-offset-2 col-sm-offset-1">-->

                                            <div class="form-group">
                                                <input type="text" class="form-control" name="name" placeholder="first name" required="">
                                            </div>

                                            <div class="form-group">
                                                <input type="email" class="form-control" name="email" placeholder="Email" required="">
                                            </div>

                                            <div class="form-group">
                                                <input type="text" class="form-control" name="subject" placeholder="Subject" required="">
                                            </div>

                                            <div class="form-group">
                                                <textarea class="form-control" name="message" rows="8" placeholder="Message"></textarea>
                                            </div>

                                            <div class="">
                                                <input type="submit" value="Submit" class="btn btn-primary">

and when I want someone who clikck on submit, i want to receive the message on my personal mail. Any idea ? Thanks

Evan F
  • 1
  • 1
    You will need server-side code in place to handle the sending via email. – S. Dev May 16 '18 at 10:27
  • Possible duplicate of [How to create an email form that can send email using html](https://stackoverflow.com/questions/8239782/how-to-create-an-email-form-that-can-send-email-using-html) – JJJ May 16 '18 at 10:31
  • @S.Dev actually one can send emails from the browser as well, using a mail sending API. It is true, however, that it sends requests to a remote server, which in turn handle the mail sending, but from the point of the developer there is a large difference. – Lajos Arpad May 16 '18 at 10:35

1 Answers1

0

First you will need to make sure you know where you want to send the email from. Which computer should send the email? The server where you submit the form, or the client computer on which the web browser of the user is running?

If you want the server to send the email, you will need to write server-side code which will handle the form submit when the user clicks on the submit button. Inside that server-side code, you might use your own SMTP, or you can use a server-side mailer API, there are tons of possibilities and we are not aware of what server-side technology you are using, if any.

Of course you can send the emails from the browser as well, using a client-side mailer API.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175