当前位置: 首页 > 图文教程 > 网络编程 > ASP > 使用ASPMail组件发送数字卡片

ASP
迁移到 ASP .NET:需考虑的重要问题(2)
ASP中优化数据库处理
结合XML, ADO, 以及ASP
在ASP中优化数据库处理
提高ASP性能的最佳选择(一)
返回UPDATE SQL语句所影响的行数的方法
ASP如何使用MYSQL数据库
安全维护 IIS asp 站点的高级技巧
也谈ASP中的RESPONSE属性
ASP提速技巧
在ASP中如何访问Novell下的数据库
改善ASP性能和外观的技巧集锦(上)
改善ASP性能和外观的技巧集锦(中)
改善ASP性能和外观的技巧集锦(下)
利用ASP在浏览器上打印输出
用ASP文件实现CPU的使用率始终保持100%
ASP 0115 Error的解决方案
Varchar与char的区别
探讨一下rs(0)和rs(fieldname)的执行效率
连接WEB数据库的ADO性能提高技巧

使用ASPMail组件发送数字卡片


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 33 ::
收藏到网摘: n/a

  Sending Digital PostCards with ASP and the free component ASPEmail from Persits software.
By Joao Vieira

What is a Digital Postcard?
A digital postcard is a image a net surfer picks out, along with an accompanying personal message. The net surfer "sends" the postcard by supplying a friend's email address. A link is then emailed to the address supplied. The link takes the receiver of the digital postcard to the site which displays the image and contains the personal message.



First you must create a database to house the information for the postcards. (I use a DataBase to put the PostCards information so that when a person gets the mail with the post card only have to click on the link and the page apears, goin to DB to get the Data. So here it is the structure of my DataBase (you can make your own, with more information if you intend to.


Postal
ID_POSTAL Autonumber
passw integer
postal Text
nameto Text
namefrom Text
emailfrom Text
emailto Text
Message Text
Data Text

For the digital postcard system to work, you will need a number of images for the postcards. In my example I have six unique postcards, and 12 images for the postcards: a thumbnail and normal size image for each postcard. I also use images for buttons, the main ones being View, Send, and Repeat.

Concerning the code, I want to warn you that I am not going to be going deep into the HTML aspect; I will concentrate on the ASP. If you have any questions about this article, please contact me.

You will have to make an HTML form. I used the POST method, because I don't like to see all ofthe information submitted in the address link box. (Related Article! Passing Data Between ASP Pages)

FILE: makin.html
This file contains the form where we get all of the information from the user. This information will be used to make the digital postcard.

<form  
     name="postalsent"  
     method="post"  
     action="view.asp?fromn=seeit"  
     target="_self"
>

.....
    <td width="24" valign="bottom">
       <font face="Arial">
         <input type="radio" value="postal1" name ="R1">
       </font>
    </td>

    <td width="140">
       <font face="Arial">
      <IMG border=2 height=86 src="/upload/tech/20091103/20091103100639_acf4b89d3d503d8252c9c4ba75ddbf6d.gif"" width=134>
       </font>
    </td>

    <td width="12" valign="bottom">
       <font face=3D"Arial">                 
          <input type="radio" value="postal2" name ="R1">
       </font>
    </td>

    <td width="151">
       <font face="Arial">
          <IMG border=2 height=87 src="/upload/tech/20091103/20091103100639_7e7757b1e12abcb736ab9a754ffb617a.gif"" width=134>
       </font>
    </td>