How do I send an email from an HTML site form?

Asked

Viewed 16,660 times

0

I have a template for an HTML site that has an email form,?

<h3>Email</h3>
<form method="post" action="#">
    <div class="row uniform">
        <div class="6u 12u(3)">
            <input type="text" Nome="Nome" id="Nome" value="" placeholder="Nome" />
        </div>
        <div class="6u 12u(3)">
            <input type="email" Nome="email" id="email" value="" placeholder="Email" />
        </div>
        <div class="6u 12u(3)">
            <input type="text" Nome="Assunto" id="Assunto" value="" placeholder="Assunto" />
        </div>
    </div>

    <div class="row uniform">

        <div class="6u 12u(2)">
            <input type="checkbox" id="human" Nome="human" checked>
            <label for="human">Sou humano</label>
        </div>
    </div>
    <div class="row uniform">
        <div class="12u">
            <textarea Nome="message" id="message" placeholder="Digite sua mensagem" rows="6"></textarea>
        </div>
    </div>
    <div class="row uniform">
        <div class="12u">
            <ul class="actions">
                <li><input type="submit" value="Enviar" /></li>
                <li><input type="reset" value="Limpar" class="alt" /></li>
            </ul>
        </div>
    </div>
</form>

  • You will need to use a programming language. An example is PHP. In addition to having to exchange some tags from inputs who are listed as "Name=" and must be "name=" Here’s how to email with PHP: http://www.marcelotorresweb.com/formulario-de-contacto-em-php/

  • Is using some server side language?

  • 1

    If it is without the help of server-side languages, I have just seen that it is duplicated here: http://answall.com/questions/213/ - If it is with PHP, it is this one: http://answall.com/questions/23602/

  • 1

1 answer

3

Without using a language server side, the way it is:

<form method="post" action="mailto:[email protected]">

But this is a somewhat problematic solution, as it depends on the user having a properly configured email client (only works for Webmail in somewhat special conditions, and not only if the browser be prepared for this).

With the support of a language server side, everything changes. Then you have to specify which language is in question.


EDIT: searching better, seems duplicate of this:

How to send emails only with HTML5 basics

If it is with PHP, it is duplicate of this:

How to send email with PHP?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.