473,396 Members | 2,061 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,396 software developers and data experts.

Can Javascript send emails??

Hi,

I am building a site for a client which has an enquiry form on it.
Normally I would something like PHP to send the form but the client doesn't
want to pay for a server that supports PHP, so the form is sent using the
mailto: command within the <form> tag. This sends the email fine but it is
rather messey. Could I use javascript to tidy up the form output and then
send an email with the contents, similar to the 'Mail' command in PHP?

Any help or advice greatly received!!
Jul 23 '05 #1
13 2851
Richard H wrote:
Hi,

I am building a site for a client which has an enquiry form on it.
Normally I would something like PHP to send the form but the client doesn't
want to pay for a server that supports PHP, so the form is sent using the
mailto: command within the <form> tag. This sends the email fine but it is
rather messey. Could I use javascript to tidy up the form output and then
send an email with the contents, similar to the 'Mail' command in PHP?


"Rather messy" is an understatement.

Using mailto: implies the existance and proper configuration of a "default
E-mail client", something not everyone has available to them. Worse still, the
very people who are having problems with your customer's Web site are the ones
most in need of contact with them, and the ones least likely to be able to do
so.

Tell your client to cough up the extra bucks for PHP or Perl support with their
Web hosting provider and do it correctly.

Client-side JavaScript is not going to allow you to clean up the resulting
E-mail in any way, use a proper server-side solution.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2
On Wed, 15 Sep 2004 18:21:47 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:

[snip]
Tell your client to cough up the extra bucks for PHP or Perl support
with their Web hosting provider and do it correctly.


If they really want to do it on the cheap, they could use one of the free
services, or one which offers form mail at a lower cost than full
server-side support (if you expect high traffic).

To Richard:

I've seen free web hosts provide form mail, even if PHP was out of the
question. It might be an idea to see if your client's host provides a
script already.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3
Grant Wagner wrote:
Tell your client to cough up the extra bucks for PHP or Perl support
with their Web hosting provider and do it correctly.


I have run PHP on Linux and Perl on both Linux and Windows (I believe
there's also a PHP that runs on Windows). Never had to "cough up" any
bucks at all? Where are you guys getting PHP and/or Perl and coughing up
money?
--
Future historians will be able to study at the Gerald Ford Library; the
Jimmy Carter Library; the Ronald Reagan Library and the Bill Clinton
Adult Bookstore.
Jul 23 '05 #4
"Andrew DeFaria" <An****@DeFaria.com> wrote in message
news:5e**************************@msgid.meganewsse rvers.com...
Grant Wagner wrote:
Tell your client to cough up the extra bucks for PHP or Perl support
with their Web hosting provider and do it correctly.


I have run PHP on Linux and Perl on both Linux and Windows (I believe
there's also a PHP that runs on Windows). Never had to "cough up" any
bucks at all? Where are you guys getting PHP and/or Perl and coughing up
money?


If you look closer, he wrote:
"...PHP or Perl support with their Web hosting provider..."

most web host charge extra if you want db-access or server side scripting
abilities in addition to the web space.

--
Dag
58°26'15.9" N 008°46'45.5" E
Jul 23 '05 #5
To be honest PHP is by far my prefered solution, but i am yet to find anyone
that allows server side scripting for free!!

Main problem is that the client picked and paid for his hosting before I got
involved. He had just purchased a mac (shudder) and so wants to host with
..mac. This is fine but i can not find anywhere whether they allow server
side or not! There set up is very much idiots guide to hosting your first
webpage. Anyone know whether .mac allow server side, or even how to contact
them to find out?? (they don't seem to have a contact address on their
site).

Failing all else I will have to trust the user has an email programme and
tell my client to deal with the mess!!

Thanks for all your help!
Jul 23 '05 #6
In article <ci**********@athena.ukc.ac.uk>,
"Richard H" <rj***@kent.ac.uk> wrote:
To be honest PHP is by far my prefered solution, but i am yet to find anyone
that allows server side scripting for free!!
Have you looked at the free form processing site. For example, see:
http://www.form-mail.com/
http://www.response-o-matic.com/

These sites will forward your form data in an email.

Here is where I got the above sites.

http://www.google.com/search?hl=en&l...free+form+mail
&btnG=Google+Search

This search was gotten from ~kaeli~.

The server program cgiemail process form data on a server. See:
http://web.mit.edu/wwwdev/cgiemail/

mindspring.com has a grandfathered version of cgiemail.
Main problem is that the client picked and paid for his hosting before I got
involved. He had just purchased a mac (shudder) Wise move by the way. and so wants to host with
.mac. This is fine but i can not find anywhere whether they allow server
side or not! There set up is very much idiots guide to hosting your first
webpage. Anyone know whether .mac allow server side, or even how to contact
them to find out?? (they don't seem to have a contact address on their
site).


Well, he didn't spend much money on .mac. Tell him he needs a form
server. Find some other server with cgiemail on it.

Robert
Jul 23 '05 #7
On Thu, 16 Sep 2004 16:56:45 GMT, Robert wrote:
http://www.google.com/search?hl=en&l...free+form+mail
&btnG=Google+Search


Link tips..

A lot of what is in the Google links is unnecessary..

The link above, after we dump all the junk
Google themselves add into it, becomes..
<http://www.google.com/search?q=free+form+mail>
...but those 14,300,000 can be trimmed to be
a bit more specific with this search..
<http://www.google.com/search?q=free+"form+mail">
(54,800)

And.. even if you cannot trim a long link,
you can protect it from being broken by news
reader software simply by enclosing it in '<' '>'
<http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&q=free+form+mail&btnG=Google+Search>

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 23 '05 #8
Andrew DeFaria wrote:
Grant Wagner wrote:
Tell your client to cough up the extra bucks for PHP or Perl support
with their Web hosting provider and do it correctly.

I have run PHP on Linux and Perl on both Linux and Windows (I believe
there's also a PHP that runs on Windows). Never had to "cough up" any
bucks at all? Where are you guys getting PHP and/or Perl and coughing up
money?


Yes, PHP runs on Windows, and quite well.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #9
Randy Webb wrote:
Andrew DeFaria wrote:
Grant Wagner wrote:
Tell your client to cough up the extra bucks for PHP or Perl support
with their Web hosting provider and do it correctly.

I have run PHP on Linux and Perl on both Linux and Windows (I believe
there's also a PHP that runs on Windows). Never had to "cough up" any
bucks at all? Where are you guys getting PHP and/or Perl and coughing up
money?


Yes, PHP runs on Windows, and quite well.


*Sigh*.

The original post read (in part): "... I am building a site for a client which
has an enquiry form on it. Normally I would something like PHP to send the
form but the client doesn't want to pay for a server that supports PHP, ..."

So it was the original poster who indicated that his client did not want to
pay for a Web hosting provider that supported PHP.

My response was: "Tell your client to cough up the extra bucks for PHP or Perl
support with their Web hosting provider and do it correctly."

I thought the whole "... support with their Web hosting provider ..." was
adequate to explain I am talking about his client's choice to host their Web
site on a provider who does not offer PHP support for the money they are
paying. Web hosting providers will sometimes charge more for PHP or other
server-side technologies over and above what they would charge for bare-bones
HTML only Web hosting (when and if they offer various service levels).

His client downloading and installing either Perl or PHP on either Linux or
Windows at no cost might be a great victory for the open sores software
movement, they might even be able to put together a kickass screaming site
that runs off http://localhost. But it does his client NO GOOD WHATSOEVER
because none of the code written will do what it is supposted to on their
choice of Web hosting provider because they are not paying that Web hosting
provider for PHP support.

So yes, if I want PHP support on a publically accessible Web site hosted by a
3rd party, I will most certainly have to "cough up the bucks" if I want an
appropriate amount of storage, bandwidth, administrative tools, back-end
database, site logging and no Web hosting provider inserted ads (which is what
you'd want if you are a business running a Web site).

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #10
On 2004/09/15 18:37, in article ci**********@athena.ukc.ac.uk, "Richard H"
<rj***@kent.ac.uk> wrote:
Hi,

I am building a site for a client which has an enquiry form on it.
Normally I would something like PHP to send the form but the client doesn't
want to pay for a server that supports PHP, so the form is sent using the
mailto: command within the <form> tag. This sends the email fine but it is
rather messey. Could I use javascript to tidy up the form output and then
send an email with the contents, similar to the 'Mail' command in PHP?

Any help or advice greatly received!!


Hi Richard

Do it in Perl. Assuming that your HTML form is all up and running and you
have your JavaScript validation routines written, then putting a Perl script
behind it is by far the easiest solution. There are plenty of freebie
scripts (check out Google) or since you're in the UK like me, send me an
email with your email specification, I'll send you back a working script
within within the day and invoice you £100.

On the other hand... You will kick yourself when you see how easy it is when
you do it yourself :-)

Have fun!

Ian

Jul 23 '05 #11
The host I use for my domain in the US gives me 1000MB disc space and
5000MB bandwidth per month for about US$10 per month on a yearly
basis. They have other plans with more storage and bandwidth for more,
or you can just buy extra bandwidth. A am on a Unix server, but
Microsoft ones are available for a bit more. CGI form mail is a snap
on the Unix server. It is included in the monthly fee. You just go to
the control panel page and click a button to install CGI form mail(or
a guest book, etc.). When you go to the web shell you will find
everything all set up in the cgi-bin along with example pages of how
to write the html form mail page for specific user input. If you want
to write your own CGI with perl, etc, there is an additional charge
for this. Unless you are very experienced in CGI and perl it may be
best to use the standard form mail provided by the host to avoid
possible hacks. The host also has several pop mail accounts associated
with your domain in the basic package. The feedback from the form gets
stored as pop3 mail that you can recover at many eMail hosts,
including the free Yahoo one. If I were in your situation, I would get
an account on a new host and dump the old one as soon as I could.
Perhaps other uses could be found for the old account until it
expires. Also, for business use, look for a host that has many more
optional pay features in case you ever need them - these can include
secure pages, shopping carts, etc. that can be installed very easily.
There is a glut of hosts, but it is well worth the time to sort
through many until you find the one just right for you.
Jul 23 '05 #12
JRS: In article <41***************@agricoreunited.com>, dated Fri, 17
Sep 2004 21:57:34, seen in news:comp.lang.javascript, Grant Wagner
<gw*****@agricoreunited.com> posted :
So yes, if I want PHP support on a publically accessible Web site hosted by a
3rd party, I will most certainly have to "cough up the bucks" if I want an
appropriate amount of storage, bandwidth, administrative tools, back-end
database, site logging and no Web hosting provider inserted ads (which is what
you'd want if you are a business running a Web site).


No spelling-checker in your news-composing system, then?

<URL:http://www.merlyn.demon.co.uk/mail-use.htm> may help.

What is *really* needed is an HTML- and script- aware checker, that can
be used on the source of a page (one would not expect checking of
computed strings).

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #13
On 2004/09/16 11:17, in article ci**********@athena.ukc.ac.uk, "Richard H"
<rj***@kent.ac.uk> wrote:
To be honest PHP is by far my prefered solution, but i am yet to find anyone
that allows server side scripting for free!!

Main problem is that the client picked and paid for his hosting before I got
involved. He had just purchased a mac (shudder) and so wants to host with
.mac. This is fine but i can not find anywhere whether they allow server
side or not! There set up is very much idiots guide to hosting your first
webpage. Anyone know whether .mac allow server side, or even how to contact
them to find out?? (they don't seem to have a contact address on their
site).

Failing all else I will have to trust the user has an email programme and
tell my client to deal with the mess!!

Thanks for all your help!


If it's a MacOS X server (hooray), it will have Apache (hooray) and is rock
solid reliable, virtually crash proof and F A S T.

Windows sucks, Linux is cool, Unix is good. Amen

Jul 23 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thom McGrath | last post by:
I'm writing a simple mailing list program, and I would like to know what the suggested method of sending a large number of emails to a list of addresses. (sounds like spam, no?) It's perfectly...
40
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the...
28
by: Noone Here | last post by:
AIUI, it was not all that long ago when the threat to personal users, was attachments that when executed compromised machines with keyloggers, trojans, etc. Now it seems that the big problem is...
3
by: Roop | last post by:
Hello All, I need to ask one thing Please help me out form this..... I need to send a mail through Javascript. This mail includes the details of the User . I search with light and lamp but...
7
by: Steve | last post by:
hello, i need to send emails ( HTML emails ) that have javascript processing kept enabled when they reach their destination.i tried but seems everything related to javascript ( events, keywords...
4
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. ...
0
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, My company will be hosting a webcast, and I need to send out 2000 individual emails to people who signed up (for login information...). I created an smtp app that I can loop through...
3
by: Ken | last post by:
I am trying to run two form.submit() in sequence when clicking on <input image... ..."try this" When calling send() with only invoice.submit active, the form invoice works correctly. When...
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 ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.