Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to pass the body message to outlook express?

    In the example i was doing now, a user have to press "Send" button to open outlook express and the subject (a input text box) and body message (a text area) in the HTML will be passed to it.

    But currenty i'm facing a problem where the body message is not pass to the body part of the outlook express.

    Below is some of my coding:

    Java script:
    1) Function of activate outlook express
    Code:
    function sendMail() 
    { 
    	window.location="mailto:"+"?subject="+"=?body="; 
    }

    Under <body> tag:
    1)Subject input text box
    Code:
    <td> <form name="mail" method="get" action="mailto:">
                     <input name="subject" type="text" size="35">
                     </form></td>
    2)Body text area
    Code:
    <td><form name="mail2" method="get" action="mailto:">
                  <textarea name="body" input type="submit" value="Send" cols="80" rows="19" wrap="OFF"></textarea>
                </form></td>
    3)"Send" button
    Code:
    <img src="send1.gif" name="send" class="notPrinted" width="107" height="32" border="0" onClick="sendMail();">

    Hope someone could check the code posted here.

    Thanks.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    You don't need to start a new thread with the same topic. That's against the rules of this forum. You already had this before.

    You don't need to put each field in different form. Just use one form.
    Code:
    <form name="myform" method="get" action="mailto:">
    <input name="username" type="text" readonly="readonly" id="username" size="35" />
    <input name="classname" type="text" readonly="readonly" id="classname" size="35" />
    <input name="subject" type="text" size="35" />
    <input name="currdate" type="text" readonly="readonly" value="" size="35" />
    <textarea name="body" cols="80" rows="19" wrap="OFF"></textarea>
    
    <input type="image" src="send1.gif" name="send" class="notPrinted" width="107" height="32" border="0" />
    </form>
    That's it, no need for javascript. You only need to modify some of your scripts that's referencing the old form name.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just change someone@somewhere.com to the email address that you want the mail to be sent to.
    PHP Code:
    <form name="mail" method="get" action="mailto:someone@somewhere.com">
        <
    td>
            <
    input name="subject" type="text" size="35">
        </
    td>
        <
    td>
            <
    textarea name="body" input type="submit" value="Send" cols="80" rows="19" wrap="OFF"></textarea>
            <
    input type="image" src="send1.gif" name="send" class="notPrinted" width="107" height="32" border="0">
        </
    td>
    </
    form
    Last edited by theekid182; 01-08-2005 at 10:37 PM.

  • #4
    New Coder
    Join Date
    Jan 2005
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry that ,glenngv.

    Do you mean my problem of not able to pass the body message to outlook express is because of i'm using different form name?

  • #5
    New Coder
    Join Date
    Jan 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by apple
    sorry that ,glenngv.

    Do you mean my problem of not able to pass the body message to outlook express is because of i'm using different form name?
    Everything needs to be in the same form.

  • #6
    New Coder
    Join Date
    Jan 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Everything works in the code that I posted... so just copy out my code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •