473,287 Members | 1,582 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,287 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 77381
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: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.