iam sending mail using cdonts in asp
there is no error but the mail is not send.
can some one help me in this.
this is the code


set objMail=Server.CreateObject("CDONTS.NewMail")
objMail.From=FromId
objMail.To=ToId
objMail.Subject=MailSubject
objMail.BodyFormat=0 ' for HTML
objMail.MailFormat = 0 ' for MIME
objMail.Body=MailMessage
objMail.Send

set objMail=nothing

Dani AI

Generated

Short summary and focused troubleshooting notes based on the thread: the script in this topic constructs a CDONTS mail object and calls Send, but no delivery occurs even though no runtime error appears. correctly flagged host support for CDONTS; beyond that, most "no error but not sent" cases are environmental (SMTP relay, policy, or routing) rather than a syntax bug in the ASP snippet posted by .

Checklist (high‑value items to inspect):

  • Confirm an SMTP service is actually reachable from the web host (local SMTP or an allowed relay). CDONTS depends on a local relay and does not perform SMTP authentication to remote servers.
  • Inspect the SMTP server’s queue/pickup folder and SMTP logs for rejected/queued messages. Silent drops commonly show up there.
  • Check server event logs and add ASP error trapping so script-side failures are visible.
  • Verify the From address and domain are allowed by the sending host (SPF/anti‑spoofing can cause silent rejection).
  • Test connectivity from the host to the SMTP port (telnet host 25) and perform a simple HELO/MAIL/RCPT exchange to observe server responses.
  • Check spam/junk folders and try sending to a mailbox on the same server to separate “leave server” problems from downstream delivery issues.
  • On a development box such as Windows 98, confirm a proper SMTP service is present; many desktop setups lack a relay and must be tested on the real hosting environment.

A minimal error-capture pattern to make silent failures visible:

On Error Resume Next
objMail.Send
If Err.Number <> 0 Then
  Response.Write "CDONTS Send failed: " & Err.Number & " - " & Err.Description
End If

When authentication or detailed SMTP control is required, switching to CDOSYS (on supported Windows/IIS versions) or a third‑party component that supports SMTP auth (as noted) resolves many host-policy issues. For form workflows like described, persist form data first, then attempt send and log failures so submissions are never lost even when mail flow is blocked.

Recommended Answers

All 8 Replies

See Brinkster knowledgebase:

Make sure your server support CDONT first!

my server supports cdon't,then what is the problem in the code

now a day i am designing a site in which my client requirement is that when customer fill the form , the form information automically receive my client by email address.

i mean when customer fill product form then information submit in database and also my client receive same informatin in the form of email address.

my operating system is win98

and database is microsoft access

i know u cam help me.

i din't get your question.can u please explain this

"i mean when customer fill product form then information submit in database and also my client receive same informatin in the form of email address.
"
again.what is this clients means.

now a day i am designing a site in which my client requirement is that when customer fill the form , the form information automically receive my client by email address.

i mean when customer fill product form then information submit in database and also my client receive same informatin in the form of email address.

my operating system is win98

and database is microsoft access

i know u cam help me.

first of all thanks for reply

now clients means person or company for whom i am designing a site.
in short i have same question or problem that u wrote in this thread.

but iam using asp
win98 operating system
microsoft Access database

can i use cdonts in my case
if yes then how i can use in my web page
if not then what is another procedure.

If you can instal JMail or ASPMail to your server (or they have been installed), it will be easier and there are many open source code on the internet.
see http://www.haneng.com tutorial, also see

hello
u can get the details of the form submited and store it in the database.

the content of the form can be considerd as mailmessage and send the mail
mailmessage="<table><tr><td>CustomerName:"&CustomerName & "<td><tr>"
mailMessage=MailMessage&"<tr><td>CustomerEmailAddress:"&emailID&"<td><tr>"
mailMessage=MailMessage&"----------"
MailMessage=MailMessage& "</table>"


set objMail=Server.CreateObject("CDONTS.NewMail")
objMail.From=FromId
objMail.To=ToId
objMail.Subject=MailSubject
objMail.BodyFormat=0 ' for HTML
objMail.MailFormat = 0 ' for MIME
objMail.Body=MailMessage
objMail.Send

set objMail=nothing

thanks for solve my problem :p

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.