Hi all,
I am a complete newbie to ASP and am trying to send email from my gmail account to another gmail ID. Is it possible? I have my computer with no mail server installed. i have IIS installed and working. i have used the following code. I am getting the error..
CDO.Message.1 (0x80040213)
The transport failed to connect to the server.
the error is throwing at '.Send' line. the actual mail IDs given in from and to are real and existing ones... Please help me out..
[code=asp]
<html>
<head>
<title>Mail send</title>
<%
sch = "http://schemas.microso ft.com/cdo/configuration/"
Set cdoConfig = CreateObject("C DO.Configuratio n")
With cdoConfig.Field s
.Item(sch & "sendusing" ) = 2
.Item(sch & "smtpserver ") = "smtp.gmail.com "
.update
End With
Set cdoMessage = CreateObject("C DO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "myemail1@gmail .com"
.To = "myemail2@gmail .com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
</head>
<body>
</body>
</html>[/code]
Thank u in advance..
I am a complete newbie to ASP and am trying to send email from my gmail account to another gmail ID. Is it possible? I have my computer with no mail server installed. i have IIS installed and working. i have used the following code. I am getting the error..
CDO.Message.1 (0x80040213)
The transport failed to connect to the server.
the error is throwing at '.Send' line. the actual mail IDs given in from and to are real and existing ones... Please help me out..
[code=asp]
<html>
<head>
<title>Mail send</title>
<%
sch = "http://schemas.microso ft.com/cdo/configuration/"
Set cdoConfig = CreateObject("C DO.Configuratio n")
With cdoConfig.Field s
.Item(sch & "sendusing" ) = 2
.Item(sch & "smtpserver ") = "smtp.gmail.com "
.update
End With
Set cdoMessage = CreateObject("C DO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "myemail1@gmail .com"
.To = "myemail2@gmail .com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
</head>
<body>
</body>
</html>[/code]
Thank u in advance..
Comment