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 March 24th, 2005, 08:12 PM
Registered User
 
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default need help with e-mail validation

i can't find a good code to check if e-mail exists. im trying to do this with cdo. maybe someone could sugest some source?
or maybe could help to make it...
here is what im trying to do

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
set imsg = createobject("cdo.message")
set iconf = createobject("cdo.configuration")
Set Flds = iconf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "<SMTP Server>"
.Update
End With
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & ""
strHTML = strHTML & "This another section of the message...</BR>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"
With iMsg Set
.Configuration = iConf
.To = "<valid e-mail address>"
.From = "<valid e-mail address>"
.Subject = "This is a test CDOSYS message (Setting DSN options)"
.HTMLBody = strHTML
.fields("urn:schemas:mailheader:disposition-notification-to") = "<valid e-mail address>"
.fields("urn:schemas:mailheader:return-receipt-to") = "<valid e-mail address>"
.DSNOptions = cdoDSNSuccessFailOrDelay
.DSNOptions = 14
.fields.update
.Send
End With

i'm sending message to the e-mail i want to check for validation. and i can get confirmation that mail was sent succesfuly. but the problem is that i get it by mail. i want to check if e-mail is valid in the source code. if its possible

thank you

 
Old March 25th, 2005, 03:30 AM
Authorized User
 
Join Date: Aug 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sherief Send a message via Yahoo to sherief
Default

as fas as i know there is no way you can check if the email address is exists using ASP scripts, the only thing you can do just validate email address that users give is using valid email address formula.
example: you can check that your@your is not valid formula, and check that [email protected] is a valid formula.

-----
Regards,
Sherief C. Mursyidi
 
Old March 25th, 2005, 04:47 AM
Registered User
 
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

check this out
http://dotnet.dart.com/samples/Everify.asp

 
Old April 10th, 2005, 08:14 AM
Authorized User
 
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is really no way of checking if an email address is valid. What i do is use a regular exp to check for the obvious, . @ chars etc.. Then i do some error checking. Ie if err.number <> 0 then blah blah... You cant prevent people from entering a fake email address but you can help to prevent problems et

DJWright





Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 AM
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
Form mail validation plexus PHP How-To 0 April 14th, 2006 05:58 AM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





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