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

Recommended Answers

All 8 Replies

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.

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.