Jay
Jay

Reputation: 3

Using html mailto to send variable or multiple variable values into the body of the email

I am trying to use the mailto in order to put variable values into the body of the email using this code:

<p>
This is another mailto link:
<a href="mailto:[email protected][email protected]&[email protected]&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!" target="_top">Send mail!</a>
</p>

Then I would like the end user to be able to copy and paste those values into excel easily

Upvotes: 0

Views: 8485

Answers (1)

Dhruv Ramani
Dhruv Ramani

Reputation: 2643

Here's a solution I found. It uses JavaScript :

<a href="#" onclick="javascript:window.location='mailto:'+EmailVairable+'?subject='+SubjectVariable+'&cc='+CCvariable+'&bcc='+BCCvariable+'&body='+BodyVariable">Email</a>

Upvotes: 1

Related Questions