Jump to content

Getting mailto to work


Zaithe

Recommended Posts

How do I get the action=mailto email@domain.com thingy to work? Have I typed it wrong? Also, I need to add that to the submit button so when people press submit it sends the information they put in the form to my E-Mail.Many Thanks.

Link to comment
Share on other sites

Ok so you have a form that you want to submit the info to your email. In the action attribute of your form add this:

<form name="form1" method="post" action="mailto:myemail@domain.com">...

That's it!

Link to comment
Share on other sites

Ok so you have a form that you want to submit the info to your email. In the action attribute of your form add this:
<form name="form1" method="post" action="mailto:myemail@domain.com">...

That's it!

It doesn't work...when people click submit it comes up with the Outlook or whatever E-mail thing they use but when they press send, it doesn't send me a E-Mail...
Link to comment
Share on other sites

what browser are u using some just add a que to outlook to be sent on send receive. some open outlook ask u to hit send then adds a que. and about 5 percent of people it will actually send u an email. without hitting send receive. and like no people actually use outllok so u cant count on the send receive button being hit.

Link to comment
Share on other sites

Ok, im guessing your host has PHP support? (I hope so)anyways, first create two pages,home.php and mail.phpHere is the body coding for home.php:

<form action="mail.php" method="POST">Your email adress:<input type="text" name="thereemail"><br>Subject:<input type="text" name="subject"><br>Email:<br><input type="textarea" name="email" heigth="10" width="30"><br><input type="submit" value="send email!"><br></form>

Here is the coding for mail.php:

<?php$subject = $_POST['subject']$email = $_POST['email']$there_email = $_POST['thereemail'] mail("youremail@domain.com","$subject","$email","From:$there_email");?>

There are a few minor adjustments need like:in mail.php change "youremail@domain.com" to whatever your email adress isother thigns like that..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...