How can i sending Mail thru Cdonts and Jmail???

I am having the coding for sending mail thru jmail and cdonts. But if the mail is invalid for example(ss@kk.com) then the cdonts and jmail returns true or value that i have send the mail. But it is false. Then my gateway search for the particular domain and it was locked in gateway due to invalid ID. so these was the problem ?. Please do the needful for me?. I want to get wheteher it was sent to the Mail id or not. I want to get a reply mail sent or Failure for the Mail ID.
srinivasmrAsked:
Who is Participating?
 
epeeleConnect With a Mentor Commented:
In either case, if the mail was sent successfully, but to an invalid email account, the message will be returned to the address assigned to either the FROM property or to the RETURNADDRESS property (JMail only).

In NEITHER case will an error be generated if the email address is properly constructed but invalid.

However, to proactively prevent this problem, you could use a component (listed in earlier message) to query the target MX Server to verify that the email address in question is in fact valid and able to receive mail.  

After doing this, you could use simple error handling (JMail supports error messages, CDONTS does not) in your page to make sure the page executes properly with something like:

.....
on error resume next
JMail.execute
if err <> 0 then
Response.Write(JMail.ErrorMessage)
Response.End()
end if
.....

or

.....
on error resume next
set objMail = Server.CreateObject("CDONTS.NewMail")
'set objMail properties
objMail.Send()
if err <> 0 then
Response.Write(Err.description)
Response.End()
end if
....
0
 
Michel SakrCommented:
you can't effectively.. the best you can do to know it failed you should include a return address so that the mail hostmaster returns you a failure notice to your mailbox.. Jmail supports this cdont if I remember correctly doesn't

0
 
srinivasmrAuthor Commented:
Hai Silers5!

  Can u tell me clearly!! I am Not able to follow ur words! Please
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
srinivasmrAuthor Commented:
Hai Silers5!

  Can u tell me clearly!! I am Not able to follow ur words! Please
0
 
srinivasmrAuthor Commented:
Hai Silers5!

  Can u tell me clearly!! I am Not able to follow ur words! Please
0
 
srinivasmrAuthor Commented:
Hai Silers5!

  Can u tell me clearly!! I am Not able to follow ur words! Please
0
 
Michel SakrCommented:
I don't have jmail installed.. check if the component have a return address proprety.. so if the mail fails it will return to you.. hmm in cdonts the mail server will return the mails to the email you included in the from
0
 
epeeleCommented:
srinivasmr,

The first article below is an excellent article on email validation which will help you to determine what is necessary to validate the email address prior to sending it, including whether or not the domain is registered and able to receive mail.

The Forgotten Art of Email Address Validation
http://www.4guysfromrolla.com/webtech/093000-1.shtml

Another article with source code:
http://coveryourasp.com/ValidateEmail.asp#Result3

Components for email validation using Domain MX queries:
http://www.hexillion.com/software/components/HexValidEmail/
http://www.nehuenmultimedia.com.ar/html/vmailcom.html
http://www.email-screen.com/index-emailscreen.html
0
 
srinivasmrAuthor Commented:
Dear epeele!!

   I want to know whether cdonts or jmail will return mail error demo to the from ID. If jmail or cdonts will return mail failure demo to the from id. My question is if from ID also get wrong then how can the process is to be?.

0
 
epeeleCommented:
You could try the below to test:

Response.Write ConvertBinary(g_vtInfo)

of course, using the function in the earlier example.
0
 
epeeleCommented:
woops, disregard last post.  Posted on wrong question. sorry
0
 
Michel SakrCommented:
heh.. that binary array is driving everybody crazy :o)
0
 
epeeleCommented:
Yep!  That's the kind of question that makes this all worthwhile.  Something we can all learn from.
0
 
puranik_pCommented:

        No comment has been added lately, so it's time to clean up this TA.
         I will leave a recommendation in the Cleanup topic area that this question is:

->    Accept epeele's comment as answer

         Please leave any comments here within the next seven days.
         
         PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
         
         puranik_p
         EE Cleanup Volunteer  

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.