Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2005, 11:16 PM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default Unknow problem with smtp/cdosys.

Hi,
I want to write email application(just sending emails) in asp, for that i m using cdosys,
I want to know whether my smtp(virtual server) is running fine or not, but i dont know how to do that, well in IIS it is running. but don't know how to test it.
Further, when i write an email code given below, it dosen't show me error but I do not receive any mail too.
The address where i am sending mail is on different mail server,

Please help me out..
<%
Dim ObjSendMail
Dim iConf
Dim Flds

Set ObjSendMail = Server.CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1

'**** Path below may need to be changed if it is not correct
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
Flds.Update

Set ObjSendMail.Configuration = iConf
ObjSendMail.To = "[email protected]"
ObjSendMail.Subject = "this is the subject"
ObjSendMail.From = "[email protected]"

' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "this is the body"
ObjSendMail.TextBody = "this is the body"

ObjSendMail.Send

Set ObjSendMail = Nothing
%>

 
Old June 15th, 2005, 04:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Simpler way is to telnet the computer (that is supposed to run smtp service) on port 25 using command prompt.
Code:
telnet your_computer_name_or_IP 25
If you are connected then smtp is running fine. Else you can either check that from "Manage" option of "My computer", and expand the "services and applications" and see if the SMTP server is not stopped. Alternatively from the "services" console, see if "Simple Mail Transfer Protocol" service is running.

Also check queue or badmail kind of folders under c:\inetpub\mailroot\ if it contains the mail that you tried sending.

Hope that helps.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem using CDOSYS shankhan Classic ASP Components 1 January 9th, 2009 11:22 AM
SMTP problem adorable.ashish ASP.NET 2.0 Professional 0 March 7th, 2008 04:36 AM
ASP CDOSYS Problem kwilliams Classic ASP Basics 0 December 7th, 2006 11:55 AM
asp sending unknow problem powerMan Classic ASP Professional 0 October 4th, 2005 08:25 PM
Problem Using CAPICOM, CDOSYS and EXCEL Interop wi ParthaChoudhury General .NET 0 May 3rd, 2004 03:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.