Send email from html form without php [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there a service that allows you to post a form to it from an html page (my php mail isn't working temporarily and I need a quick solution) and it will automatically send an email with specified content to a specified address?
The address it comes from is insignificant.

Check out formspree.
https://github.com/asm-products/formspree
For action you simply put:
<form action="http://formspree.io/you#email.com" method="post">
<input type="text" name="name">
<input type="email" name="_replyto">
<input type="submit" value="Send">
After verifying your email after the first send this will email you the contents of the form. One thing to keep in mind is that this will take the input names. If you do not include input names it won't send you that form field.

There's no perfect solution because they are still encoded as url variables. Setting the enctype to plaintext makes it somewhat more acceptable.
<form action="mailto:email#example.com" enctype="text/plain">
<textarea></textarea>
</form>

I don't believe you can within the website. As the others stated, you can use mailto:someone#blahblah.com, but that is not automatic and it opens the user's default email editor. You could use http://www.emailmeform.com/ though. It lets you make a form and it will send an email to you.

in your html form provide a mailto action.
for example
<form action="mailto:yourdest#email.com">
.....
</form>

Related

How do I use PHP to create a dynamic answer based on a users input from a form? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I basically want to create a simple text input with a button that says submit. And using PHP I want to be able to give a different answer based on what the users input was. For example, if the user inputs the number 6, I want it to display "You are on week 6" - Can someone help me? I am having some trouble putting this together to get it to work.
The simple version is something like this:
<?php
echo "You are on week".$_POST['week'];
Your form would look like:
<form method="post">
<input name="week" />
<input type="submit" value="Submit" />
</form>
But it's much more complicated than this; you have to validate the input and worry about injection attacks, among other things.
You will get better help on here if you provide some code that you already have in place and ask specific questions about particular problems.
When your form is
<form method="post">
<input name="nameOfYourInput"/>
<input type="submit" value="sendButton"/>
</form>
This doesn't depend on serverside language be it php or any other language.
Specific to php is only the printing of the variable in the input field.
which can be achieved by
<?php
echo "You are on week" . $_POST['nameOfYourInput'];
The $_POST is variable which is passed(automaticaly) to the server with the http request.

How to send an email to recipient [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I know that there are multiple posts and questions out there on How to send an email from HTML form. But, I am having a slightly different query.
I have an HTML form, what I want is that when I click on submit, it should not show the information in a mail, but it should directly send the form information to recipients email ID. When I tried the following code:
<form action="mailto:dummy1#chamisplace.com" method="POST"
enctype="multipart/form-data"
name="EmailTestForm">
Your Name:<br>
<input type="text" size="20" name="VisitorName"><br><br>
Your Comment:<br>
<textarea name="VisitorComment" rows="4" cols="20">
</textarea><br><br>
<input type="submit" value="Email This Form">
</form>
It is opening a MS Outlook window with the form information. But it is not sending it automatically.
use mail() function of php
mail($email_to, $email_subject, $email_body)
and you have to configure ur email
http://stackoverflow.com/a/18185233/2535521
<?php
$to="mailaddredd";
$from= "ownmailaddress";
$subject="Subject";
$message ="Comments";
mail($to,$subject,$message);
?>
If you are using only mailto for your action and not using any PHP script you can't send it automatically because you are having your form open and send data to the users prefered email program which can't be controlled remotely as far as sending emails. That is a good thing because that would be a way to spam people without thinking/knowing about it.
If you are looking to use PHP to send an email there's tons of libraries and tutorials on this site or even searching Google.

Contact page on website sends visitor to second form [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
When pressing send on my contact page (www.mainmanfilms.com/contact.html) I am sent to my contact-form-handler.php page that requires the visitor to re-type their information. Is there a way to may it one-fluid step? Ideally, they press send and receive my thank-you message. Anything you can offer is appreciated.
Yes. You can leave the action attribute empty and configure the form to POST to itself.
Normally, you'd do something like this:
<form action="contact-form-handler.php" method="post">
If you want to process the form and display the output in the same page, you need to make the following change (note the action attribute being empty:
<form action="" method="post">
An example:
<?php
if (isset($_POST['formsubmit'])) {
//form was submitted, do other stuff
echo $_POST['username']; //example
}
?>
<form action="" method="post">
<input type="text" name="username" />
<input type="submit" name="formsubmit" />
</form>

W3Schools Try-it Editor [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Does anyone know how to get, or where to get, or how to make, or where to find a tutorial, about the w3schools try it editor?
I need an editor like it, so when typing js/html/css the code be accepted and shown like the tryit editor.
If I understand that correctly, you're looking for a Javascript or PHP editor?
For JS I use jsfiddle.net,
and for PHP I use codepad.org.
The "editor" you are referring to is nothing more but:
<form action="<?= $_SERVER["PHP_SELF"] ?>" method="POST">
<input type="submit">
<textarea name="code"><?= htmlentities($_POST["code"]) ?></textarea>
<div id="output">
<?= $_POST["code"] ?>
</div>
And the PHP form sending could even be replaced by:
<button onclick='$("#output").html( $("textarea#code").value )'>
Your question wasn't super clear, but it sounds like you're asking for another tool similar to the W3Schools Tryit Editor.
I use http://jsfiddle.net/, and I love it. It lets you quickly add HTML, JS, and CSS to the editor and get the results. It also lets you save/share your code with others. It's great for mocking up something quick and sending it out to get approved or to get help with syntax.

Tools to make HTML forms send emails automatically [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I've 5 huge ugly forms written in HTML ... I wanna convert those forms to send emails using PHP automatically without going through each one and reading the post variables then constructing the mail code ... There was a tool online once but I cannot find it and I forgot its name ...
Any one can recommend something?
Tools like this save you time when you're working on a static website but require a contact form. Check this link, it has a couple of options: http://www.html-form-guide.com/form-mail/form-mail-script.html
The whole blog seems to be dedicated to web forms creation.
Best regards!
Regardless, you will have to point the action="" to some location. I suggest setting up a web service that accepts what you post to it. Then redirect all your old forms action="" option to that web service address.

Categories