Recommended: A simple and easy-to-use UBB editor (with code) There are many online editors nowadays, and they are powerful, such as eWebEditor, but they also take up a lot of space. Some simple forums and message boards do not require too powerful functions. HtmlEditor is such an editor, which is simple and beautiful, and is convenient to call. It is recommended for everyone to use. Code when calling, submit page: form method=POST action=Post.a
| <% a=request(name) aa=request(phone) aaa=request(mail) aaaa=request(yb) aaaaa=request(dz) b=request(bt) bb=request(content) 'The above is the requested data, just submit it to the normal form. DimJMail, contentId SetJMail=Server.CreateObject(JMail.Message) JMail.Charset=gb2312 'Mail character set, default is US-ASCII 'JMail.ISOEncodeHeaders=False 'Whether ISO encoding is performed, the default is True 'Sender information (can be assigned by variables) [email protected] 'The email address used to send JMail.FromName=Website 1'Sender name JMail.Subject=Mailbox a 'Mail Subject 'Authentication [email protected] 'The mailbox used to send JMail.MailServerPassword=xxxxxx 'Password 'Set priority, ranging from 1 to 5, the larger the priority, the higher the priority, 3 is normal JMail.Priority=3 JMail.AddHeaderOriginating-IP,Request.ServerVariables(REMOTE_ADDR) 'Add a recipient [Variable email: Recipient address] You can add multiple reports repeatedly in the same statement JMail.AddRecipient([email protected]) 'Add attachment [Variable filename: the absolute address of the attachment file, ensuring that the user IUSR_???? has access permission] '【System Yes (True) No (False) is the Inline method】 'contentId=JMail.AddAttachment(filename,True) 'Mail body (HTML (note the way to link attachments in the letter)) JMail.HTMLBody=Sender's name: &a&<br>Tel: &aa&<br>mail: &aaa&<br>Zip code: &aaaa&<br>Contact address: &aaaa&<br>Title: &b& <br> Content: &bb&<br> 'Mail body (text part) JMail.Body=Our email is in HTML format. Please click on the HTML content below the email to view the detailed content. 'Send【Call format: objJMail.Send([username:password@]SMTPServerAddress[:Port])] sendok=JMail.Send(mail.xxx.com) 'Send mail server ifsendokthen endstr=The email has been sent successfully! else endstr=Send email failed, it may be that you filled in the wrong email address. <br/>&_ If you are sure that you did not write the wrong email address, it may be that the sending program has been issued<br/>&_ For a failure, please contact the administrator! endif 'Close and clear the object JMail.Close() SetJMail=Nothing %> <%=endstr%> |
Share: How to prevent repeated voting on online voting ASP object has 5 objects in ASP: Request, Response, Session, Application, and Server. The following is only explaining the object attributes that can be used in this article. Please refer to relevant information for other attributes. The principle of the method provided in this article is: set a logical variable IsVoted to verify the value of IsVoted before voting. Only when the value is False,