/    Sign up×
Community /Pin to ProfileBookmark

Send HTML Email using Java Script

Hi All,

I need to send HTML page in the email by using [B]mailto:[/B] functionality of HTML. I am using html5 for mobile.
Please provide me any example or link on the same.

-pratush

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@Big_O_1_Feb 21.2011 — the mailto attribute of an anchor tag will not send an email. It will open the default email client (Outlook, Thunderbird, Webmail, etc.) and allow the user to type their message and send it. To send an email with code you will need a server side language like PHP, .NET, or Ruby. Javascript alone can not send an email.
Copy linkTweet thisAlerts:
@kumarpratushauthorFeb 21.2011 — Thanks for replying.

I want the same feature. But I need to set the message as in the [B]body[/B] of email.

Basically went user click mailto tag then default system email will be open with html body.
Copy linkTweet thisAlerts:
@Big_O_1_Feb 21.2011 — If I understand correctly, you want to open the user's email client with the body of the email already written. If that's the case, you can do something like this.

<a href="mailto:[email protected]?body=This is the body of the email. You can change it before sending or send as is.">Email me</a>

More information: http://www.ianr.unl.edu/internet/mailto.html
Copy linkTweet thisAlerts:
@kumarpratushauthorFeb 21.2011 — thank you very much Big O(1) .

You are right,I want to do the same thing. but insted of [B]This is the body of the email. You can change it before sending or send as is.[/B] , i want to set the html data. like with some formating coloring and all that.

Thanks for great help please give me final the answer. ?
Copy linkTweet thisAlerts:
@Big_O_1_Feb 21.2011 — hmmm.. I have personally never done this. As far as I know, if you place html code instead of text there, it will show the code with tags and attributes and not format it.
Copy linkTweet thisAlerts:
@kumarpratushauthorMar 01.2011 — Hi Big O(1),

Your suggestions was very helpful for me ?. I have one more query i.e.

How many character we can attached with the [B]body[/B] attribute of mailto: function.

Actually i need to add much data in the email body.

Can you help me out ....
×

Success!

Help @kumarpratush spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...