Home > Web Front-end > JS Tutorial > body text

Pure javascript to automatically send emails

高洛峰
Release: 2016-12-17 12:45:27
Original
5670 people have browsed it

Description:

This JavaScript will help you email people. Just click email and there's someone! And the JavaScript will ask you for the email address, subject, etc. and then a new email will be opened to you.

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function mailsome1(){
who=prompt("Enter recipient&#39;s email address: ","antispammer@earthling.net");
what=prompt("Enter the subject: ","none");
if (confirm("Are you sure you want to mail "+who+" with the subject of "+what+"?")==true){
parent.location.href=&#39;mailto:&#39;+who+&#39;?subject=&#39;+what+&#39;&#39;;
  }
}
// End -->
</SCRIPT>
<a href=&#39;javascript:mailsome1()&#39;>E-Mail Someone!</a>
<FORM>
<input type=button value="E-Mail Someone!" onClick="mailsome1()">
</FORM>
Copy after login

Okay, the above is the code to automatically send emails using javascript. The code is simple and easy to understand


For more articles related to pure javascript to automatically send emails, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!