A
aroraamit81
Hi,
I am using CDO component to send emails through my ASP page as I am
having IIS on windows XP..........
Now the mails goes and gets into mailroot\Queue folder but does not
reaches to the destination........
Pls tell me what do I need to do.........
here goes my code for your reference.....
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2
Const cdoSendUsingExchange = 3
Const cdoAnonymous = 0
Const cdoBasic = 1
Const cdoNTLM = 2
'Sends an email To aTo email address, with Subject And TextBody.
'The email is In text format.
'Lets you specify BCC adresses, Attachments, smtp server And Sender
email address
Function SendMailByCDO(aTo, Subject, TextBody, smtp, aFrom )
on error resume Next
Dim Message 'As New CDO.Message '(New - For VBA)
'Create CDO message object
Set Message = CreateObject("CDO.Message")
'Set configuration fields.
With Message.Configuration.Fields 'Original sender email address
..Item("http://schemas.microsoft.com/cdo/configuration/sendemailaddress")
= aFrom
' SMTP settings - without authentication, using standard port 25 on
host smtp
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing ")
= cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
.Item(" http://schemas.microsoft.com/cdo/configuration/smtpserver")
= smtp
'SMTP Authentication
..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate
") = cdoAnonymous
.Update
End With
'Set other message fields.
With Message
'From, To, Subject And Body are required.
.From = aFrom
.To = aTo
.Subject = Subject
'Set TextBody property If you want To send the email As plain text
.HTMLBody = TextBody
'Set HTMLBody property If you want To send the email As an HTML
formatted
'.HTMLBody = TextBody
'Blind copy And attachments are optional.
If Len(BCC)>0 Then .BCC = BCC
If Len(Files)>0 Then .AddAttachment Files
'Send the email
.Send
End With
'Returns zero If succesfull. Error code otherwise
SendMailByCDO = Err.Number
End Function
Function SendMail()
Const smtp = "20.139.68.2"
Const aFrom = "(e-mail address removed)"
aTo="(e-mail address removed)"
Subject="Foo"
TextBody="fsdfsdfsd"
call SendMailByCDO(aTo, Subject, TextBody, smtp, aFrom )
End Function
call SendMail()
Regards,
Amit Arora
I am using CDO component to send emails through my ASP page as I am
having IIS on windows XP..........
Now the mails goes and gets into mailroot\Queue folder but does not
reaches to the destination........
Pls tell me what do I need to do.........
here goes my code for your reference.....
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2
Const cdoSendUsingExchange = 3
Const cdoAnonymous = 0
Const cdoBasic = 1
Const cdoNTLM = 2
'Sends an email To aTo email address, with Subject And TextBody.
'The email is In text format.
'Lets you specify BCC adresses, Attachments, smtp server And Sender
email address
Function SendMailByCDO(aTo, Subject, TextBody, smtp, aFrom )
on error resume Next
Dim Message 'As New CDO.Message '(New - For VBA)
'Create CDO message object
Set Message = CreateObject("CDO.Message")
'Set configuration fields.
With Message.Configuration.Fields 'Original sender email address
..Item("http://schemas.microsoft.com/cdo/configuration/sendemailaddress")
= aFrom
' SMTP settings - without authentication, using standard port 25 on
host smtp
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing ")
= cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
.Item(" http://schemas.microsoft.com/cdo/configuration/smtpserver")
= smtp
'SMTP Authentication
..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate
") = cdoAnonymous
.Update
End With
'Set other message fields.
With Message
'From, To, Subject And Body are required.
.From = aFrom
.To = aTo
.Subject = Subject
'Set TextBody property If you want To send the email As plain text
.HTMLBody = TextBody
'Set HTMLBody property If you want To send the email As an HTML
formatted
'.HTMLBody = TextBody
'Blind copy And attachments are optional.
If Len(BCC)>0 Then .BCC = BCC
If Len(Files)>0 Then .AddAttachment Files
'Send the email
.Send
End With
'Returns zero If succesfull. Error code otherwise
SendMailByCDO = Err.Number
End Function
Function SendMail()
Const smtp = "20.139.68.2"
Const aFrom = "(e-mail address removed)"
aTo="(e-mail address removed)"
Subject="Foo"
TextBody="fsdfsdfsd"
call SendMailByCDO(aTo, Subject, TextBody, smtp, aFrom )
End Function
call SendMail()
Regards,
Amit Arora