By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,856 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,856 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
di********@yahoo.com,ew**@yah.com,gj*@yahoo.com

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

Aug 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"Ap*********@ingenero.com" <ap*********@ingenero.com>, "Ashish Pethe"
<ap****@ingenero.com>, "Ashwini Pasricha" <ap*******@ingenero.com>,
"Balaji Kale" <bk***@ingenero.com>

Now when I click ComposeMail new window opens but with only one address
"Ap*********@ingenero.com"

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
di********@yahoo.com,ew**@yah.com,gj*@yahoo.com

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
Aug 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.