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

Can i send an email from JavaScript?

P: n/a
Can i send an email from JavaScript? Is it possible? If yes please the
code to send email using javascript...

Jan 24 '07 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
Can i send an email from JavaScript? Is it possible? If yes please the
code to send email using javascript...
Depending on browser setting and email client:

<button
onclick="mailto:my@self.xyz?subject=hi&body=ha">
send
</button>

With serverside javascript the possibilities are many.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 24 '07 #2

P: n/a
Hi,
Thanks for your answer....
ok agreed that this can send email...but is it possible to send email
without using outlook... i still have to use outlook to click the send
button.... can i send this email without using outlook... i hope you
understand the scenario

Regards,
Mahernoz
On Jan 24, 3:38 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
Can i send an email from JavaScript? Is it possible? If yes please the
code to send email using javascript...Depending on browser setting and email client:

<button
onclick="mailto:m...@self.xyz?subject=hi&body=ha">
send
</button>

With serverside javascript the possibilities are many.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 24 '07 #3

P: n/a
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
On Jan 24, 3:38 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
>Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
Can i send an email from JavaScript? Is it possible? If yes please
the code to send email using javascript...Depending on browser
setting and email client:

<button
onclick="mailto:m...@self.xyz?subject=hi&body=ha" >
send
</button>

With serverside javascript the possibilities are many.
[Please do not toppost on usenet]
Thanks for your answer....
ok agreed that this can send email...but is it possible to send email
without using outlook...
Off course you can.

I never used Outlook, using Pegasus since 1996.
i still have to use outlook to click the send
button.... can i send this email without using outlook... i hope you
understand the scenario
Please stop thinking Outlook! There are many othe ways of using email.

Automated email transmission from clientside web page needs some form of
acknoledgement from the user. Or would you like that by browsing a page
a mail is sent from your computer without your intervention?

Compromizing [bad, bad, bad] browser security settings, you can execute
any command line as a shell command. There are many small command line
email clients that will do that.

Serverside, depending on the server's configuraton, you can do what you
like! [and that is my choice, done it many a time]

Do you understand the difference between serverside and clientside code?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 24 '07 #4

P: n/a

Hi Sir,
Yes i do understand the difference between server side and client side
code.... but the fact is i myself want to have this unsecured
behavior.... i want an application like this... i want to write in a
page_load event a script that when the page_load happens an email is
sent to me.... i will send this page as an email... so that when the
guy opens the email i am notified about it! In the email i naturally
cannot use any scripts...? can i do this by clientside or serverside
code? any idea? That's why i needed this unsecured behavior....

Is there a way by which i can do this...? I am preparing an Email Read
Notification System similar to ReadNotify.com and any approach like
clientside or serverside is acceptable....

Regards,
Mahernoz

On Jan 24, 5:16 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
On Jan 24, 3:38 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
Can i send an email from JavaScript? Is it possible? If yes please
the code to send email using javascript...Depending on browser
setting and email client:
<button
onclick="mailto:m...@self.xyz?subject=hi&body=ha">
send
</button>
With serverside javascript the possibilities are many.[Please do not toppost on usenet]
Thanks for your answer....
ok agreed that this can send email...but is it possible to send email
without using outlook...Off course you can.

I never used Outlook, using Pegasus since 1996.
i still have to use outlook to click the send
button.... can i send this email without using outlook... i hope you
understand the scenarioPlease stop thinking Outlook! There are many othe ways of using email.

Automated email transmission from clientside web page needs some form of
acknoledgement from the user. Or would you like that by browsing a page
a mail is sent from your computer without your intervention?

Compromizing [bad, bad, bad] browser security settings, you can execute
any command line as a shell command. There are many small command line
email clients that will do that.

Serverside, depending on the server's configuraton, you can do what you
like! [and that is my choice, done it many a time]

Do you understand the difference between serverside and clientside code?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 24 '07 #5

P: n/a
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
Yes i do understand the difference between server side and client side
[Please do not toppost on usenet]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 24 '07 #6

P: n/a

I am not clear about your previous message [Please do not toppost on
usenet]... what does it mean?

Regards,
Mahernoz
On Jan 24, 5:35 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
Yes i do understand the difference between server side and client side[Please do not toppost on usenet]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 24 '07 #7

P: n/a
Mahernoz wrote:
I am not clear about your previous message [Please do not toppost
on usenet]... what does it mean?
It means "do not post *on* *top* of other messages.

Note that my reply is *below* your message, but that my reply and your
message are both *on* *top* of the message from Evertjan that you were
replying to. This is what "top-posting" means.

To make messages easier to read, always add your reply *below* the
message you are replying to.
On Jan 24, 5:35 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
>Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
>>Yes i do understand the difference between server side and
client side[Please do not toppost on usenet]
-- Evertjan. The Netherlands. (Please change the x'es to dots in
my emailaddress)
Jan 24 '07 #8

P: n/a


On 24 Jan., 13:22, "Mahernoz" <maher...@gmail.comwrote:
Hi Sir,
Yes i do understand the difference between server side and client side
code.... but the fact is i myself want to have this unsecured
behavior.... i want an application like this... i want to write in a
page_load event a script that when the page_load happens an email is
sent to me.... i will send this page as an email... so that when the
guy opens the email i am notified about it! In the email i naturally
cannot use any scripts...? can i do this by clientside or serverside
code? any idea? That's why i needed this unsecured behavior....

Is there a way by which i can do this...? I am preparing an Email Read
Notification System similar to ReadNotify.com and any approach like
clientside or serverside is acceptable....

Regards,
Mahernoz

On Jan 24, 5:16 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
On Jan 24, 3:38 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
>Mahernoz wrote on 24 jan 2007 in comp.lang.javascript:
Can i send an email from JavaScript? Is it possible? If yes please
the code to send email using javascript...Depending on browser
setting and email client:
><button
>onclick="mailto:m...@self.xyz?subject=hi&body=ha" >
>send
></button>
>With serverside javascript the possibilities are many.[Please do not toppost on usenet]
Thanks for your answer....
ok agreed that this can send email...but is it possible to send email
without using outlook...Off course you can.
I never used Outlook, using Pegasus since 1996.
i still have to use outlook to click the send
button.... can i send this email without using outlook... i hope you
understand the scenarioPlease stop thinking Outlook! There are many othe ways of using email.
Automated email transmission from clientside web page needs some form of
acknoledgement from the user. Or would you like that by browsing a page
a mail is sent from your computer without your intervention?
Compromizing [bad, bad, bad] browser security settings, you can execute
any command line as a shell command. There are many small command line
email clients that will do that.
Serverside, depending on the server's configuraton, you can do what you
like! [and that is my choice, done it many a time]
Do you understand the difference between serverside and clientside code?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
This is no problem: What about:

onload = function() {
UniAjax.request({
uri: 'sendMail.php',
method: 'post',
arguments: {
bodysHTML: document.body.innerHTML
}
});
}

So this little function sends an Ajax request to a PHP file on your
server. This file contains a little function that sends a mail to you.
You can't send a mail from client side directly. If you PHP Server and
use Ajax - no problem. UniAjax.request is a method you find in UniAjax
- an Ajax framework. More about it: http://uniajax.net

The PHP file 'sendMail.php' looks like this

<?php
@mail('y**************@domain.com', 'subject', $_POST['bodysHTML']);
?>

This should work -more about mail:
http://www.php.net/manual/de/ref.mail.php

Andi

Jan 24 '07 #9

P: n/a
Hi Friends,

Thanks for all your support...

All of my friends, Please don't be negative thinkers... be positive in
your approach towards the solution... the solution is very easy i found
it... please look at this article...

http://www.anupshinde.com/articles/H...Mail-Receipts/

Regards,
Mahernoz
On Jan 24, 7:54 pm, "webEater" <andreaskal...@gmx.dewrote:
On 24 Jan., 13:22, "Mahernoz" <maher...@gmail.comwrote:
Hi Sir,
Yes i do understand the difference between server side and client side
code.... but the fact is i myself want to have this unsecured
behavior.... i want an application like this... i want to write in a
page_load event a script that when the page_load happens an email is
sent to me.... i will send this page as an email... so that when the
guy opens the email i am notified about it! In the email i naturally
cannot use any scripts...? can i do this by clientside or serverside
code? any idea? That's why i needed this unsecured behavior....
Is there a way by which i can do this...? I am preparing an Email Read
Notification System similar to ReadNotify.com and any approach like
clientside or serverside is acceptable....
Regards,
Mahernoz
On Jan 24, 5:16 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
>Mahernozwrote on 24 jan 2007 in comp.lang.javascript:
On Jan 24, 3:38 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
>Mahernozwrote on 24 jan 2007 in comp.lang.javascript:
Can i send an email from JavaScript? Is it possible? If yes please
the code to send email using javascript...Depending on browser
setting and email client:
<button
onclick="mailto:m...@self.xyz?subject=hi&body=ha">
send
</button>
With serverside javascript the possibilities are many.[Please do not toppost on usenet]
Thanks for your answer....
ok agreed that this can send email...but is it possible to send email
without using outlook...Off course you can.
I never used Outlook, using Pegasus since 1996.
i still have to use outlook to click the send
button.... can i send this email without using outlook... i hope you
understand the scenarioPlease stop thinking Outlook! There are many othe ways of using email.
Automated email transmission from clientside web page needs some form of
acknoledgement from the user. Or would you like that by browsing a page
a mail is sent from your computer without your intervention?
Compromizing [bad, bad, bad] browser security settings, you can execute
any command line as a shell command. There are many small command line
email clients that will do that.
Serverside, depending on the server's configuraton, you can do what you
like! [and that is my choice, done it many a time]
Do you understand the difference between serverside and clientside code?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)This is no problem: What about:

onload = function() {
UniAjax.request({
uri: 'sendMail.php',
method: 'post',
arguments: {
bodysHTML: document.body.innerHTML
}
});

}So this little function sends an Ajax request to a PHP file on your
server. This file contains a little function that sends a mail to you.
You can't send a mail from client side directly. If you PHP Server and
use Ajax - no problem. UniAjax.request is a method you find in UniAjax
- an Ajax framework. More about it:http://uniajax.net

The PHP file 'sendMail.php' looks like this

<?php
@mail('yourmailaddr...@domain.com', 'subject', $_POST['bodysHTML']);
?>

This should work -more about mail:http://www.php.net/manual/de/ref.mail.php

Andi
Jan 27 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.