Click here to load reader

第 9 章 運用 CDO 物件寄發 電子郵件

  • View
    109

  • Download
    0

Embed Size (px)

DESCRIPTION

第 9 章 運用 CDO 物件寄發 電子郵件. 製作. 基本觀念 - E-mail 的相關協定. 四種處理 E-mail 訊息的相關協定( protocol ): SMTP POP IMAP MIME. 基本觀念 - E-mail 的相關協定. SMTP 簡單信件傳輸協定( Simple Mail Transfer Protocol , SMTP )將規範郵件的傳送機制,定義於 RFC 2821 ( http://www.ietf.org/rfc/rfc2821.txt )。 - PowerPoint PPT Presentation

Text of 第 9 章 運用 CDO 物件寄發 電子郵件

  • 9 CDO

  • - E-mailE-mailprotocol SMTP POP IMAP MIME

  • - E-mailSMTPSimple Mail Transfer ProtocolSMTPRFC 2821http://www.ietf.org/rfc/rfc2821.txt CDOE-mailSMTP E-mailSMTP E-mailSMTP POPIMAP

  • - E-mailPOP POPPost Office ProtocolPOP 3RFC 1939http://www.ietf.org/rfc/rfc1939.txtPOPE-mail POP 3

  • - E-mailIMAP Internet Message Access ProtocolIMAP IMAP4RFC 2060http://www.ietf.org/rfc/rfc2060.txtIMAP

  • - E-mailMIME MIMEMultipurpose Internet Mail ExtensionsMIMERFC 822RFC 2045RFC 2046RFC 2047

  • - CDOCDOCollaboration Data ObjectsCDOASPMessagingCollaboration

  • - CDOMessage MessageE-mailE-mailConfiguration

  • - CDOConfiguration ConfigurationCDOE-mailE-mail

  • - CDOBodyPart MIMEMessageBodyPart

  • CDOE-mail - ASPASPCDOE-mail STEP 1ConfigurationE-mail STEP 2Message STEP 3

  • CDOE-mail - ASPSTEP 1ConfigurationE-mail CDOE-mailConfiguration Set = Server.CreateObject("CDO.Configuration")

  • CDOE-mail - ASPConfigurationFieldsitemE-mail

    http://schemas.microsoft.com/cdo/configuration/http://schemas.microsoft.com/cdo/configuration/

  • CDOE-mail - ASP

  • CDOE-mail - ASPSTEP 2MessageE-mailMessage Set = Server.CreateObject("CDO.Message")

  • CDOE-mail - ASPMessageE-mailConfigurationMessageConfiguration Set msg.Configuration = conf'E-mailConfigurationMessage

  • CDOE-mail - ASPMessage

  • CDOE-mail - ASPE-mail

  • CDOE-mail - ASPSTEP 3 SendE-mail msg.Send

  • CDOE-mail - E-mailMessageAddAttachment Message.AddAttachment [, [, ]]::URL:URL

  • HTML - HTMLE-mailE-mailHTMLMessageHTMLBody Message.HTMLBody = HTML

  • HTML - HTMLE-mailMessageAddRelatedBodyPartMIMEContent-Typemultipart/related Message. AddRelatedBodyPart , , [, [, ]]

  • HTML - HTMLE-mail: : E-mailHTML:

  • HTML - HTMLE-mail HTMLsrccid:

  • HTML - HTMLE-mail URLE-mailw2145 URLPath = "http://bitc.myweb.hinet.net/books/images/A4033.jpg" msg.AddRelatedBodyPart URLPath, "w2145", 1

  • HTML - HTMLMessageCreateMHTMLBodyURLE-mail

    HTMLE-mailE-mailE-mail

  • HTML - HTMLCreateMHTMLBody Message.CreateMHTMLBody URL[, [, [,]]] URL E-mailURL E-mail

  • HTML - HTML

  • HTML - HTML

  • HTML - HTMLURLE-mail URLPath = "http://bitc.myweb.hinet.net/books/database/A4033.htm" msg.CreateMHTMLBody URLPath, 31 'URLPathE-mailE-mail

  • HTML - HTMLMIMEE-mail MIMEE-mailHeaderContent

  • HTML - HTMLMIMEHeader -

  • HTML - HTMLMIMEContent - TextAttachment HeaderContent-Type RTFRich Text FormatContent-Typemultipart/alternativeE-mailContent-Typemultipart/related

  • HTML - HTMLMIMEBodyPartMessageBodyPart Set BodyPart = Message.BodyPartBodyPartBodyPartsBodyPart Set BodyPart = Message.AddBodyPart

  • HTML - HTMLMIMECharset BodyPartBig5ContentMediaType BodyPart

  • HTML - HTMLMIME:

  • HTML - HTMLMIMEContentTransferEncoding BodyPart

  • HTML - HTMLMIMEBodyPartSTEP 1BodyPartStream BodyPartGetDecodedContentStream Set Stream = BodyPart.GetDecodedContentStream

  • HTML - HTMLMIMESTEP 2StreamLoadFromFile StreamLoadFromFileStream Stream.LoadFromFile Stream

  • HTML - HTMLMIMESTEP 3StreamFlushStream StreamFlushStream Stream.Flush