PDA

View Full Version : script to send email


trinitybrown
10-20-2008, 11:50 AM
Hello friends

I am learning PHP and Javascript. I have use script in PHP to send an email but I wish to send an email using javascript, please tell me how it can be possible

Paz
12-08-2008, 08:24 PM
Hi Trinity,

I never got a chance to welcome you to the forum!

I don't think it's possible to send an email via javascript, and even if it were possible then it would likely be a bad idea for security reasons.

You can use a simple HTML code though, such as;

<a href="mailto:test@example.com?&subject=Test email?&body=Have a look at this excellent digital markeing site>Tell the world about us!</a>

Cheers,
Paz.

kazeem
02-01-2009, 05:43 PM
NO! JavaScript can't email a form! but, there are alternatives to send the form data to an email address.

There is no direct method provided by JavaScript to send the data submitted in the form to an email address.

The main concern for not providing a 'JavaScript email form' feature is security.
Suppose there is a feature in JavaScript to send email. Some malicious coder can write a script to send email to some address immediately when you visit their page. This will reveal your email address to some third party without your knowledge. They will start filling your mail box with lots of spam messages!