 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
lilryno
Joined: 27 May 2005 Posts: 1
|
Posted: Fri May 27, 2005 9:48 am Email "submit" button |
|
|
|
Hello,
I'm trying to figure out how I can made a submit button placed on an email so that when the user opens the email, they see the button, can click the button and then an action is done.
What I need is for the submit click to send info back to my server in some fashion.
What would be perfect would be if the user clicked the "submit" button and an email response was sent from the users account behind the scenes. Or if that can't be done, if clicking the submit button brought up a "reply" email already filled out so that the user could just click "send" that would be great too.
Is any of this possible with an HTML email? Thanks much. |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Fri May 27, 2005 11:11 am |
|
|
|
You can use a HTML email to send a form.
It may be blocked though due to Security software then people use.
Your emails will probably be put straight to a blacklist.
| Code: |
<?php
$to = 'youatyou.com';
$subject = 'New Mail';
$message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<form name="form1" id="form1" method="post" action="http://www.degs.co.uk/test/php/_mail/contact_form.php">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Name</td>
<td>
<input type="text" name="name" />
</td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td>Comment</td>
<td><textarea name="comment"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Submit" /></td>
</tr>
</table>
</form>
</body>
</html>
';
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
//$headers .= 'To: You <youatyou.com>, me <meatme.com>' . "\n";
$headers .= 'From: me <meatme.com>' . "\n";
mail($to, $subject, $message, $headers);
?>
|
|
|
Zeckel
Joined: 03 Jun 2005 Posts: 1
|
Posted: Fri Jun 03, 2005 8:50 am |
|
|
|
| Do you put that entire code into a submit button? |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Fri Jun 03, 2005 9:35 am |
|
|
|
| No. that is a PHP script to send a HTML email. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|