Email und Webmail
Wie kann ich per ASP Emails versenden?

Sie befinden sich hier:

ThemenübersichtEmail und Webmail
Artikel #92

Wie kann ich per ASP Emails versenden?
Das Senden von Emails per ASP ist ganz einfach. Hier ein Beispielcode:

<%

Dim objMail
Set objMail = Server.CreateObject("CDO.Message")

With objMail.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mx.dc.local"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

objMail.From = "absender@IHREDOMAIN.de"
objMail.To = "empfaenger@domain.de"
objMail.Subject = "Betrefftext"
objMail.TextBody = "Emailtext"
objMail.Fields.Update()
objMail.Send()

Set objMail = Nothing

%>


Zurück