I borrowed the MIME class from the essence to write a basic letter (1): (In fact, the key is the issue of SMTP settings.) )

Source: Internet
Author: User
Tags key php email reset split
mime|smtp| Essence | Problem I borrowed the MIME class from the essence to write a basic letter to the small Dongdong:

Default.htm

<script language=javascript>
<!--
function Cookieset () {
D=new Date ()
D.setfullyear (2001,0,1)
Document.cookie= "sendmailbox=" +document.sendmailform.sendmailbox.value + "; expires=" + d.toGMTString ()
Alert ("Set success!") ")
}

function Setupdatevalue () {
Document.sendmailform.update.value=document.sendmailform.myfile.value
if (document.sendmailform.receivemailbox.value== "") {
Alert ("Error! Please fill in the address of the addressee!")
Document.sendmailform.receivemailbox.focus ()
Return (false)
}
}

function Readcookie () {
Cookievalue=document.cookie
Pairs=cookievalue.split (";")
for (i=0;i<pairs.length;i++) {
Pairsplit=pairs[i].split ("=")
if (pairsplit[0]== "Sendmailbox") break
}
Return (Pairsplit[1])
}
-->
</script>
<title> My php email </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
<!--
. smallfont {font-family: "XXFarEastFont-Arial"; font-size:9pt}
-->
</style>

<body bgcolor= "#FFFFFF" Onload=document.sendmailform.receivemailbox.focus () >
<p align= "center" > Welcome to use my letter page </p>
<form method= "POST" action= "Sendmail.php4" Name=sendmailform "enctype=" Multipart/form-data "return" Setupdatevalue () ">
<table width= "55%" border= "0" cellspacing= "0" cellpadding= "2" align= "center" class= "Smallfont" >
<tr>
&LT;TD width= "33%" > Addressee Letter Box:</td>
&LT;TD width= "67%" >
<input type= "text" name= "Receivemailbox" size= "" maxlength= ">"
</td>
</tr>
<tr>
&LT;TD width= "33%" > Sender's Mailbox:</td>
&LT;TD width= "67%" >
<script language=javascript>
document.write ("<input type= ' text ' name= ' sendmailbox ' size= ' maxlength= '" "" + value= () + "' >")
</script>
<input type= "button" Name= "Setcookie" value= "Set as Default Letter box" Onclick=cookieset () >
</td>
</tr>
<tr>
&LT;TD width= "33%" > Theme:</td>
&LT;TD width= "67%" >
<input type= "text" name= "subject" maxlength= "size=" ">"
</td>
</tr>
<tr>
&LT;TD width= "33%" > Accessories:</td>
&LT;TD width= "67%" >
<input type= "File" name= "MyFile" >
<input type= "hidden" name=update>
</td>
</tr>
<tr>
&LT;TD width= "33%" valign= "top" > Body:</td>
&LT;TD width= "67%" >
<textarea name= "BodyText" cols= "rows=" "8" ></textarea>
</td>
</tr>
<tr>
&LT;TD colspan= "2" valign= "Top" >
<div align= "center" >
<input type= "Submit" name= "submit" value= "Send Letter" >
<input type= "reset" name= "reset" value= "re-fill" >
</div>
</td>
</tr>
</table>
</form>
</body>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.