Thursday, June 24, 2010

ASP:SENDING EMAIL

dim str, mailobj
str="Email Metini"
'response.Write str // Gerekirse e-mail string kontrol
set mailobj = server.createobject("CDO.Message")
mailobj.Subject="ASP EMAIL"
mailobj.From="gonderen"
mailobj.To="asp@asp.com.tr"
'mailobj.TextBody = str
mailobj.HTMLBody = str
mailobj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
mailobj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "asp.com.tr"
mailobj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
mailobj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
mailobj.Configuration.Fields.Update
mailobj.Send
if err.number=0 then
Response.Write "HATA OLUSTU"
else
Response.Write err.number & err.description
end if

0 comments:

Post a Comment