Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send email using CDOSYS

Status
Not open for further replies.

manjunni

Programmer
Dec 22, 2006
2
US
Hello All:
I am developing an email ASP Page on my development machine and the appilcation is to be run on my test web server. In order to use the CDOSYS server objects I installed email services on the test web server. Wrote the code for connecting through a remote exchange server. But I get an error '8004020e' or sometimes '8004020f'. Thinking that it is a relaying problem I have set my webserver's IP address to be granted relay permissions on the exchange server. Still no use. (Even opened up port 25 on the test web server). Any help on resolving this issue is greatly appreciated.
Thanks,
Manju
Code:
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Test"
myMail.From=from_address
myMail.To=to_address(outside my domain)
myMail.HTMLBody =sHTML
myMail.Configuration.Fields.Item ("myMail.Configuration.Fields.Item (" =exchange_server_ipaddress
myMail.Configuration.Fields.Item (" =25
myMail.Configuration.Fields.Item (" = False
myMail.Configuration.Fields.Item (" = 60
myMail.Configuration.Fields.Item (" = 1
myMail.Configuration.Fields.Item (" =authuser@mydomain.com
myMail.Configuration.Fields.Item (" =auth_password
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
 
The email ids are right. I have sent them test emails using my outlook client. Also I am able to send email from the ASP page to people in my domain but the problem arises when I try to send emails outside.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top