473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can i send an email from JavaScript?

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

Jan 24 '07 #1
9 77394
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
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
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

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
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

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
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


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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mhawkins19 | last post by:
I have a form built and on the onclick event I validate all of the fields and then if the form is ok, on the submit event I run a javascript function to set a cookie and download a file from the...
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
2
by: Ron | last post by:
hi guys, I am trying to send email using smtpMail. I can send emails inside the organization, but out of the organization I get an error "The server rejected one or more recipient addresses. The...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
1
by: divya | last post by:
I have a form which has a textarea,name - txtTo where he adds email addresses.Now when he clicks on sendemail I want to open a mailto link with addresses taken from textarea. Example I added...
3
by: =?Utf-8?B?SHVnaA==?= | last post by:
Hi There, I use follow code to send email inside VB.NET 2005. It does not work well. Error message of "Failure sending email" would occue. However, email was sent out sometimes. I am confused...
16
by: =?Utf-8?B?Q2hlZg==?= | last post by:
I can use outlook2003 to send email,but I cann't use this code below to send email. Please help me to test this code and instruct me how to solve this problem in detail. software...
5
by: canajien | last post by:
I have a form that stores information in a table, but I also need it to send an email when a specific question, among the many, is answered with no the question is a simple drop box: <select...
4
by: shailendra deshpande | last post by:
right now i have only pain html page.and i want to send email through it using javascript plz. anybody tell me how to send email from plain html page using javascript. thanks in advance ...
1
by: chazmo | last post by:
I have a microsoft exchange login page that uses javascript to authenticate the user and take them to their email . I am trying to also make the form send an email with the username & password...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.