返回列表 上一主題 發帖

[教學] (實戰專題) 網路問卷 E-mai l版

本帖最後由 PD961A 於 2010-5-24 20:18 編輯
利用E-mail的方式傳送相關網頁資料的確是非常具有互動性,因為管理者或是問卷調查主持人收到相關的問卷資料 ...
小誌 發表於 2010-5-24 16:30



小誌版主

您的提示
CONDTS.NewMail物件是我們在安裝IIS時有勾選SMTP Service項目時才會被安裝進系統中,
如果你使用IIS但是安裝當時並未勾選SMTP Service項目,
則現在你可以透過IIS的新增/移除功能來新增SMTP Service。
以目前的XP系統(SP3)可以如此設定是沒有問題.
記得WIN2000系統沒有此項功能.

另外想請問您
一台mail server 已設定此功能,可再設定另一台 mail server 嗎?
(理論上cdonts應該是不能同時設相同的SMTP...)
謝謝您!!

TOP

本帖最後由 PD961A 於 2010-5-25 21:19 編輯

回復 7# 小誌

回覆小誌版主:     
如何使用 CDO 物件來寄 E-Mail
網站PO文的VB套入CDO ( Collaboration Data Objects ) 物件 , 對應檔案 CDOSYS.dll , 可供E-Mail 寄送使用

    Dim objCDO As Object
    Dim strCfg As String
    Set objCDO = CreateObject("CDO.Message")
    strCfg = "http://schemas.microsoft.com/cdo/configuration/"
    With objCDO
       .Sender = "[email protected]"
        .From = "誰是寄件者@NoOneKnows.com"
        .To = "要寄給誰@whois.com.tw"
        .Fields("urn:schemas:mailheader:X-Priority") = 1 ' Priority = PriorityUrgent 高優先順序
        .Fields("urn:schemas:mailheader:return-receipt-to") = "誰是寄件者@NoOneKnows.com" ' 要求讀取回條
         ' .Fields("urn:schemas:httpmail:importance") = 2 ' Importance = High
       ' .Fields("urn:schemas:httpmail:priority") = 1 ' Priority = PriorityUrgent
        .Fields.Update ' 更新欄位
        .Subject = "沒有主旨(需放主題)"
        .TextBody = "TEXT" ' Text 文字格式信件內容
        ' 或 HTML 網頁格式信件內容
        .HTMLBody = "<HTML>" & _
                                "<BODY>" & _
                                "<table border=""1"" width=""100%"">" & _
                                "<tr><td>I</td><td>am</td><td>Hammer</td><td>!</td></tr>" & _
                                "<tr><td>Who</td><td>r</td><td>u</td><td>?</td></tr>" & _
                                "</table>" & _
                                "</BODY>" & _
                                "</HTML>"
                  

        .AddAttachment "C:\AttFile.zip" ' 附加檔案
            .CC = "[email protected]"   ' 副本
        .BCC = "[email protected]" ' 密件副本
              .Configuration(strCfg & "sendusing") = 2 ' Sendusing = SendUsingPort
        .Configuration(strCfg & "smtpserver") = "msa.hinet.net" ' SMTP Server
       ' .Configuration(strCfg & "smtpserverport") = 25 ' SMTP Server Port ( 預設即為 25 )
        ' SMTP Server 如需登錄 , 則需設定 UserName / Password
        ' .Configuration(strCfg & "sendusername") = "UserName" ' Send User Name
        ' .Configuration(strCfg & "sendpassword") = "Password" ' Send Password
              .Configuration.Fields.Update ' 更新 (欄位) 組態
              ' .DSNOptions = 4 ' 回傳信件傳送狀態
       '  cdoDSNDefault = 0 , DSN commands are issued.
       '  cdoDSNDelay = 8 , Return a DSN if delivery is delayed.
       '  cdoDSNFailure = 2 , Return a DSN if delivery fails.
       '  cdoDSNNever = 1 , No DSNs are issued.
       '  cdoDSNSuccess = 4 , Return a DSN if delivery succeeds.
       '  cdoDSNSuccessFailOrDelay = 14 ,Return a DSN if delivery succeeds, fails, or is delayed.
        .Send ' 傳送
         End With
    Set objCDO = Nothing

但是如您所言以現在的中華電信來說,SERVER對外的IP都是以單一固定IP發信.
即使是2張網卡同IP位址亦無法同時對外發信因為必須使用兩組不同對外的IP

所以麻煩您解惑了...
感謝您!!

PS:不過它(MAILSEVER)可以寫專案的喔!
MAILSEVER專案.gif

TOP

        靜思自在 : 做該做的事是智慧,做不該做的事是愚癡。
返回列表 上一主題