Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid email address
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Valid email address
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Novell 6.x
Miscellaneous
Thread ID:
01016709
Message ID:
01016709
Views:
56
Hi All,
Is there a way that would allow me to check programmically in VF if the given email address exist in the company's email server.

Here is the code I am using to send email to the user.

pcEmail = "Zachary.Ahmed@conferon.com" &&this address is not does not exist
pcEmail = ALLTRIM(pcEmail)
Local oRE
oRE = CreateObject("VBScript.RegExp")
oRE.Pattern = "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+));
([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
llresult = oRE.test(pcEmail)
IF llResult
x="C:\Temp\Dbf\Batch.dbf"
oMSG = createobject("CDO.Message")
oMSG.To = "Zachary2.Ahmed@conferon.com"
*oMsg.cc = "Zachary.Ahmed@conferon.com"
oMSG.From = "Charismameister@conferon.com"
oMSG.Subject = "Hello Email"
oMSG.TextBody = "This is an easy way to create an email. This is a test, thus Sharon let me know if you get this."
oMSG.AddAttachment(x)

oMSG.Send()
Release oMsg
Else
Messagebox("Please enter a valid emial address.","Invalid Emial")
EndIf
Release oRe

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform