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

D

divya

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
(e-mail address removed),[email protected],[email protected]

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
 
D

divya

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

"(e-mail address removed)" <[email protected]>, "Ashish Pethe"
"Balaji Kale" <[email protected]>

Now when I click ComposeMail new window opens but with only one address
"(e-mail address removed)"

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top