Silly question this... but still a question


#1

Hi everyone, unsure if I post this question in the right section, but;
I'm trying to figure out where to put in my email address in order to get the 'SEND'-button to work properly. And how to code it? Many thanks in advance for info and help! The code looks like this;

<form class="" role="form">
  <div class="form-group">
    <input type="email" class="form-control form-control-white" id="subject" placeholder="Your Name" required>
  </div>
  <div class="form-group">
    <input type="email" class="form-control form-control-white" id="exampleInputEmail2" placeholder="Enter email" required>
  </div>
  <div class="form-group">
    <textarea class="form-control form-control-white" placeholder="Write Something" required></textarea>
  </div>
  <input type="submit" class="btn btn-o-white" value="Say Hello">
</form>

#2

Do you mean recipient email address? That would be in the hidden input elements of the form.

We don't see a Send button, but there is a Submit. However this form has no action which would normally be the URL of the form handler on the server. That is a whole other can of worms.


#3

Hi again, yes, it is recipient email address. This is actually all about a free template I found. The template happened to be exactly what I wanted and would be useful to me. Now, if I could 'just build it myself' that would be great, however, that's not the case. So my thought was to 'just' get that email-problem solved and then go for it. I can link to the template if that is alright? If not, I am sorry if have caused waste-of-time.


#4

No need to link. Have you got a form handler on the server? We cannot send an e-mail from a web page without some form of handler to generate the MIME and headers, etc. that go into building an email message. Every e-mail has to have a sender on a domain.


#5

I don't have anything yet, I just want help how to implement my email address into the template.


#7

The email will be used as a possibility to contact me - when I hopefully can put the complete site online. It should be simple enough to make this work if only I could show the template in all. I think!


#8

okay, but the form asks for the email-address? So then the form is submitted, you can use the submitted data to send an email?


#9

Just to avoid more time-consuming here (for you, I mean) - please see the free template I have in mind (link below). What I need help with is how to make emails come to me (make a recipient email). The rest I can work out myself.
Link: https://themewagon.com/themes/flusk-responsive-multi-purpose-website-template/


#10

Okay, but the <form> is just to get input, what do you have configured for actually sending and receiving emails? What back-end? languages? Mtf already asked you about this, putting your email in the template is not relevant, you have it.

You need to plug this into a back-end.


#11

Right. I begin to wonder if I just should give this up after all. This template comes with a couple of folders as well, one is called 'assets' which contents javascripts. Figured it was 'just' to do something there, but...


#12

I am not there yet - knowing what back-end is and all. I have just fragmental knowledge.


#13

judging by what i have seen so far, you are in a bit over your head.

Websites are hosted on servers, codecademy is a website, hosted on a server. If i visit codecademy (using a web browser like firefox or chrome), the browser sends a request to the codecademy server, codecademy processes the request and sends a response (the webpage i requested)

With forms, it is the same. I submit a form to the codecademy server, codecademy processes the form (like this reply i am typing), and send the appropriate response back (a new webpage with my response)

Its the same with your form, you need a back-end.

You can also run a webserver on your computer, for example using XAMPP


#14

Since our home computer is not a web server in the DNS system we cannot send an email message. There is no sender domain. That is why we need an email account. It can be on our own domain or a public domain such as gmail.com.

Webmail and client mail are treated in the same respect by their MIME type. This will take some reading down the road, and should be understood, at least the basics when going forward.

In order for a user to send a message to you, the webmaster your host server needs to be configured to recieve 'form mail' requests. The request is a POST item consisting of all the fields in your web form sent to the URL in the action attribute. The URL is the address of the handler program.

The handler program parses the POST item by the names of their fields and assembles an email message from a built-in template. This message is then mailed from that domain to the recipient in the POST data.