我想問一下大家 , 誰知道如何使用Winsock發送網頁效果的郵件, 是我們發的郵件, 但是頁面和網頁效果一樣顯示出來
如圖片的話,是直接是顯示圖片,而不是當成附件.萬分感謝.

解决方案 »

  1.   

    Option ExplicitDim OUTLOOKS As New Outlook.Application
    Public Function OutLookMailto(OUTLOOKS As Outlook.Application, _
    ByVal strSubject As String, _
    ByVal strText As String, colAddrList As Collection, _
    colAttachments As Collection) As Boolean
    Dim Mail As MailItem
    Dim strTemp
        Set Mail = OUTLOOKS.CreateItem(olMailItem)  '設定要一個新的Mail Item
        With Mail
            For Each strTemp In colAddrList
            .Recipients.Add strTemp  '新增收件人
        Next
    '     For Each strTemp In colAttachments
    '         .Attachments.Add strTemp   'Attach的File
    '     Next
            .Subject = strSubject   '主旨
            .Body = strText         '內容
            .Save                   '存入寄件夾
            .Send                   '出信件
        End With
        Set Mail = Nothing
        OutLookMailto = True
        Exit Function
    Errh:
     OutLookMailto = False
    End FunctionPrivate Sub Command1_Click()
        Call send_mail("請維護客戶料號!")
    End Sub
    Private Sub send_mail(ByVal strSubject As String)
    Set OUTLOOKS = New Outlook.Application
       Dim colAddrs As New Collection
       Dim colAttachs As New Collection
       Dim strBody As String
       Dim strText As String
       Dim blnSendOK As Boolean
         colAddrs.Add "[email protected]"
         colAddrs.Add "[email protected]"
       colAttachs.Add ""
       strText = "內容"
       blnSendOK = OutLookMailto(OUTLOOKS, strSubject, strText, colAddrs, colAttachs)
       End
    End Sub
      

  2.   

    先謝謝MM,不過MM啊,
    我說的是WinSock發送郵件,而且是網頁效果郵件,
    不是用VBA的方法,我貼的圖片會直接在郵件的內容中直接顯示出來,
    而不是當成附件,敬請大蝦指點迷津.
      

  3.   

    vb登陆器为什么 不能 在没有安装sql server上运行登陆呢?提示错误为:类不支持自动或没有此项接口。请帮帮忙吧?