How to send email to the addresses added in the text area of the form??

Discussion in 'Javascript' started by divya, Aug 24, 2006.

  1. divya

    divya Guest

    I have a form which has a textarea,name - txtTo where he adds email
    addresses.Now when he clicks on sendemail I want to open a mailto link
    with addresses taken from textarea.

    Example

    I added in the text area these three addresses
    ,,

    and now when I click on send email a ComposeMail window in outlook
    should open with these addresses added in the To field.

    Can any body help me out with how to do this.do I need to write
    javascript for this.

    I tried sumthnglike this:-

    <A HREF = 'mailto:" & txtTo.value & "'>
    SendEmail </A></span>

    This doesnot work it opens a compose mail with & txtTo.value & in the
    To field.I can the contents of text area to appear in to field.Plz
    Suggest a way.

    Cheerz
    Divya
     
    divya, Aug 24, 2006
    #1
    1. Advertising

  2. divya

    divya Guest

    I did it this way,But still there is problem,

    function Sendemail () {
    emails=document.form1.txtTo.value;
    window.location = "mailto:"+emails;

    //window.location = "mailto:" +
    document.form1.txtTo.value ;
    }



    and included this in body
    <A>

    <img border="0" src="send%20email.bmp" width="125" height="30"
    onclick="Sendemail()" >

    </A>

    Now the problem is it adds only one address from the text area .
    Example
    I hav following addresses in the text area

    "" <>, "Ashish Pethe"
    <>, "Ashwini Pasricha" <>,
    "Balaji Kale" <>

    Now when I click ComposeMail new window opens but with only one address
    ""

    Plz Help me why doesn't it insert all the text in the text area into
    the To field of Composemail window of Outlook.

    Regards
    Divya




    divya wrote:
    > I have a form which has a textarea,name - txtTo where he adds email
    > addresses.Now when he clicks on sendemail I want to open a mailto link
    > with addresses taken from textarea.
    >
    > Example
    >
    > I added in the text area these three addresses
    > ,,
    >
    > and now when I click on send email a ComposeMail window in outlook
    > should open with these addresses added in the To field.
    >
    > Can any body help me out with how to do this.do I need to write
    > javascript for this.
    >
    > I tried sumthnglike this:-
    >
    > <A HREF = 'mailto:" & txtTo.value & "'>
    > SendEmail </A></span>
    >
    > This doesnot work it opens a compose mail with & txtTo.value & in the
    > To field.I can the contents of text area to appear in to field.Plz
    > Suggest a way.
    >
    > Cheerz
    > Divya
     
    divya, Aug 24, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    4
    Views:
    921
    Eliyahu Goldin
    Jan 4, 2005
  2. Nathan Sokalski
    Replies:
    3
    Views:
    1,972
    Larry Lard
    Nov 23, 2005
  3. namespace1
    Replies:
    3
    Views:
    926
  4. Replies:
    1
    Views:
    271
  5. Replies:
    13
    Views:
    528
    Randy Webb
    May 14, 2006
Loading...

Share This Page