Jump to content

Mailto with thank you page


thetwig

Recommended Posts

Hey guys, when I do a normal mailto button, it works fine, but I have to use a form if I want to display a thank you/your message has been received page..... right? So once I do this, the subject and the body doesnt appear the way I want it to... only the can anyone tell me what I'm doin wrong?

 

<form action="mailto:karama@gmail.com?Subject=Request%20for%20Action&body=Name:%0D%0AUnit:%0D%0APhone:%0D%0A%0D%0ARequest%20for%20Action:%0D%0A" onsubmit="actionTq.html">
   <input type="submit" value="Request for Action" /><br /><br />
</form>

Link to comment
Share on other sites

really confusing... :P why dont try this way..let say u use POST method

 

 

<form action="actionTq.html" method="post">

<input name="email" type="hidden" value="<?php echo $email;?>"> ===> pass the value

  <input type="submit" value="Request for Action" />

</form>

 

then when submit button is being clicked, then

 

go to actionTq.html

 

use

$to=$_POST['email'];

$subject="xxx";

$body="xxx";

$header="xxxx";

$header.="Content-type: text/html r\n";

$message="xxxxx";

 

if(mailto($to,$subject,$message,$header))

{

  echo "Alright, your message has been successfully sent";

}

else

{

  echo "Oops error occured!";

}

 

okay hope that helps  :P

Link to comment
Share on other sites

hey robert, thanks for the tips... but I'm really confused as to what you are doing.. is there any way i can avoid using php? but if php is the only way to do it, then can you explain the code, esp the actual emailing part.. "mailto($to...)"

thnx agen... and sorry for the noobage..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.