Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid email address
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Valid email address
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Novell 6.x
Divers
Thread ID:
01016709
Message ID:
01016709
Vues:
58
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform