0

I have a form with submit button ,on click it should copy all the email addresses

available in the mailto: to the clipboard and open the default email client ,in my case

it is LOTUS notes.As i have many email addresses the lotus notes does not allow more than

250 characters ,so thats the reason im copying the email addresses to clip board and i

will manually paste it in the Lotus notes once the event is performed.

Below is the code i performed,i need to copy the email address and then fire the mailto

which opens the default email client(Lotus Notes).

<script>
function send(object,where) 
{
    if (navigator.appName.indexOf('Netscape') > -1) 
    {
        object.encoding = 'text/plain';
        object.action = where;
        object.method = 'POST';
    }
}
//--></SCRIPT>

<FORM ACTION="" METHOD=""> <INPUT TYPE="SUBMIT" value ="sendemail" 
 onClick="send(this.form,'mailto:abc1@dot.com,abc2@dot.com')">
</FORM>
Reporter
  • 3,897
  • 5
  • 33
  • 47
mark rammmy
  • 1,478
  • 5
  • 27
  • 61
  • 1
    Quite a lot of code for something trivial like `Mail` which will also open your default client assuming it is available. Much safer is to use a server side mailer. – mplungjan Dec 29 '11 at 10:30
  • There are a variety of ways to copy data to the clipboard, most of which involve flash. However, [this SO post](https://stackoverflow.com/questions/400212/how-to-copy-to-clipboard-in-javascript) has some interesting alternatives. Popping your email client can be solved with a trivial google search. – Daniel Szabo Dec 29 '11 at 10:25

0 Answers0