// EmailInfo.cpp : implementation file // #include "stdafx.h" #include "newclient.h" #include "EmailInfo.h" #include ".\emailinfo.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CEmailInfo dialog BOOL EmailCh_is_Legal(BOOL front,TCHAR ch) { if(ch<='z'&&ch>='a' || ch<='Z'&&ch>='A' || ch<='9'&&ch>='0') return TRUE; if(front && (ch == '-' || ch =='_')) return TRUE; if(!front && ch =='.') return TRUE; return FALSE; } BOOL CheckEmailAddress(CString email) { int pos = email.Find('@'); if(pos == -1 || pos == 0 || pos == (email.GetLength()-1)) return FALSE; CString tmp = email.Left(pos); int i; for(i=0;i