> ich habe folgendes Problem.
> Auf unserm Web-Server nutze ich ein f�r den Mailversand MDaemon.
> Meine Anwendung ben�tigt aber CDO, um die mails zu verschicken.
> es gibt nun zwei M�glichkeiten.
> 1.) Wie kann ich das CDO Object initialisieren und ihm klarmachen, dass es
> den MDaemon als smtp nutzen soll
> oder
> 2.) Wie kann ich das CDO Object initialisieren und einen anderen 
> smtp-server
> ansteuern(�ber mail.123.de z.B.)
> Gibt es eine entsprechende Objekteigenschaft?

Zitiert aus der Microsoft Doku:



Private Sub SendMessage(strTo As String, strFrom As String)

'Send using the Port on a SMTP server
Dim iMsg As New CDO.Message
Dim iConf As New CDO.Configuration
Dim Flds As ADODB.Fields
Dim strHTML

Set Flds = iConf.Fields

With Flds
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    .Item(cdoSMTPServer) = "smarthost"
    'Use SSL to connect to the SMTP server:
    '.Item(cdoSMTPUseSSL) = True
    .Item(cdoSMTPConnectionTimeout) = 10
    .Update
End With

' Build HTML for message body
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"

With iMsg
    Set .Configuration = iConf
    .To = strTo
    .From = strFrom
    .Subject = "This is a test CDOSYS message (Sent by Port)"
    .HTMLBody = strHTML
    '.TextBody = "This is the text body of the message..."
   
    .Send
End With

' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

End Sub


MfG, 
Markus Oestreicher [QualityHosting Support] 
------------------------------------------- 
    jetzt mit ASP.NET Unterst�tzung 
Informationen: http://www.qualityhosting.de 
  



| [aspdecoffeehouse] als [email protected] subscribed
| http://www.aspgerman.com/archiv/aspdecoffeehouse/ = Listenarchiv
| Sie k�nnen sich unter folgender URL an- und abmelden:
| http://www.aspgerman.com/aspgerman/listen/anmelden/aspdecoffeehouse.asp

Antwort per Email an