/    Sign up×
Community /Pin to ProfileBookmark

Send email using javascript

Hi, Good Day,
When a user click on a button, some calculation will be carried out and once it done, an email will be sending to his manager…my problem is, how can i send an email using javascript. As I know in ASP, smtp mail is used. Please help.
Thanks in advanced.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@CrazyMerlinFeb 28.2007 — javascript is a client-side language and so is nothing like as powerful as ASP.

have an iframe that is 1x1 pixels in size. Load into that a form with all the info in it to email it to the manager.

then on a button click send any necessary data to the form and submit it.

it is [B]not a clean method[/B] but it will work nonetheless.

be sure to make the iframe 1x1 pixel, not hidden. Opera will not allow the form to be modified if it is hidden, and if it is disabled, any info in the form will not be pass as POST array.

[B]a clean method[/B] would be to send the data to a php/asp page using Ajax and then simply using smtp to send the message on.

hope this helps.
×

Success!

Help @phoebeching 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...