人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當前位置:蘿卜系統(tǒng)下載站 > 技術開發(fā)教程 > 詳細頁面

jmail4.1用pop3收信的例子

jmail4.1用pop3收信的例子

更新時間:2022-10-03 文章作者:未知 信息來源:網(wǎng)絡 閱讀次數(shù):

<%  Set pop3 = Server.CreateObject( "JMail.POP3" )
  
  'pop3的連接用戶名,密碼,pop3地址
  pop3.Connect "username", "password", "mail.mydomain.com"

  Response.Write( "你有" & pop3.count & " 封郵件。<br><br>" )

  if pop3.count > 0 then
    Set msg = pop3.Messages.item(1)     
    ReTo = ""
    ReCC = ""
    
    Set Recipients = msg.Recipients
    separator = ", "
    
    ' 現(xiàn)在得到所有的收件人,并且存儲
    
    For i = 0 To Recipients.Count - 1
        If i = Recipients.Count - 1 Then
            separator = ""
        End If
    
        Set re = Recipients.item(i)
        If re.ReType = 0 Then
            ReTo = ReTo & re.Name & "&nbsp;(<a href=""mailto:"& re.EMail &""">" & re.EMail & "</a>)" & separator
        else
            ReCC = ReTo & re.Name & "&nbsp;(<a href=""mailto:"& re.EMail &""">" & re.EMail & "</a>)" & separator
        End If
    Next
    
    '這個程序得到附件,并且保存到服務器的硬盤上。也可以返回附件的詳細連接
    Function getAttachments()
          Set Attachments = msg.Attachments
          separator = ", "
    
          For i = 0 To Attachments.Count - 1
            If i = Attachments.Count - 1 Then
                separator = ""
             End If
    
             Set at = Attachments(i)
             at.SaveToFile( "c:\EMail\attachments\" & at.Filename )
             getAttachments = getAttachments & "<a href=""/EMail/attachments/" & at.Filename &""">" &_
                                 at.FileName & "(" & at.Size  & " bytes)" & "</a>" & separator
          Next
    End Function
      
    %>    
    <html>
      <body>
        <TABLE>
          <tr>
            <td>郵件標題</td>
            <td><%= msg.Subject %></td>
          </tr>
          <tr>
            <td>發(fā)件人</td>
            <td><%= msg.FromName %></td>
          </tr>
          <tr>
            <td>收件人</td>
            <td><%= ReTO %></td>
          </tr>
          <tr>
            <td>抄送</td>
            <td><%= ReCC %></td>
          </tr>
          <tr>
            <td>附件</td>
            <td><%= getAttachments %></td>
          </tr>
          <tr>
            <td>內容</td>
            <td><pre><%= msg.Body %></pre></td>
          </tr>        
        </TABLE>
      </body>
    </html>

<%  end if

  pop3.Disconnect

%>


溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統(tǒng)下載排行

網(wǎng)站地圖xml | 網(wǎng)站地圖html
主站蜘蛛池模板: 化隆| 卢湾区| 南陵县| 吉木乃县| 门源| 吉隆县| 个旧市| 哈巴河县| 正宁县| 吉首市| 阳新县| 上杭县| 乌拉特中旗| 永城市| 抚宁县| 屏边| 谢通门县| 会泽县| 沙河市| 梁平县| 永清县| 汨罗市| 阿瓦提县| 获嘉县| 渭南市| 金坛市| 犍为县| 瓦房店市| 汝南县| 贵州省| 雅江县| 张掖市| 萨嘎县| 高唐县| 内乡县| 河北区| 兴仁县| 呼玛县| 台中县| 龙里县| 鄱阳县|