Domino Code Fragment

Code Name*
Warn of Internet
Date*
01/15/1999
Source (or email address if you prefer)*
Mackie
IP address:.3.17.28.48
Description*
If users send mail to an Internet address - they get a warning message
Type*
Formula
Categories*
Email/PIM
Implementation:
None (plug and play)
Required Client:
(none)
Server:
(none)
Limitations:
Comments:
If users send mail to an Internet address - they get a warning message
Files/Graphics attachments (if applicable): Code:
Put code on all send / send and file buttons / on mail template

Alternatively put on FIELD VALIDATION on SendTo field on all forms





@Command([ViewRefreshFields]);
InternetCheck:="OK";
check:=@LowerCase( @Implode(SendTo;","))+@LowerCase( @Implode(CopyTo;","))+@LowerCase( @Implode(BlindCopyTo;","));
InternetAddressList:=".com" : ".edu" : ".gov" : ".org" : ".int" : ".us" : ".net" : ".uk" : ".co" : ".ad" : ".ae" : ".af" : ".ag" : ".ai" : ".al" : ".am" : ".an" : ".ao" : ".aq" : ".ar" : ".as" : ".at" : ".au" : ".aw" :".az" : ".ba " : ".bb " : ".bd" : ".be" : ".bf" : ".bg" : ".bh" : ".bi" : ".bj" : ".bm" : ".bn" : ".bn" : ".bo" : ".br" : ".bs" : ".bt" : ".bv" : ".bv" : ".bw" : ".by" : ".bz" : ".ca" : ".cc" : ".cf" : ".cg" : ".ch" : ".ch" : ".ch" : ".ci" : ".ck" : ".cl" : ".cm" :".cn" : ".cr" : ".cs": ".cu" : ".cv" : ".cx" : ".cy" : ".cz" : ".de" : ".dj" : ".dk" : ".dm" : ".do" : ".dz" : ".ec"  : ".eq" : ".ee" : ".eg" : ".eh" : ".es" : ".fi" : ".fj" : ".fk" : ".fk" : ".fm" : ".fo" : ".fr " : ".ga" : ".gb" : ".gd" : ".ge" : ".gf" : ".gg" : ".gh" : ".gi" : ".gl" : ".gm" : ".gn" : ".gp" : ".gq" : ".gr" : ".gt" : ".gu" : ".gw" : ".gy " : ".hk" : ".hm" : ".hn" : ".hr" : ".hr" : ".ht" : ".hu " : ".id" : ".ie" : ".il" : ".im" : ".in" : ".io" : ".iq" : ".ir" : ".is" : ".it " : ".je" : ".jm" : ".jo" : ".jp " : ".ke" :
".kg" : ".kh" : ".ki" : ".km" : ".kn" : ".kp" : ".kp" : ".kr" : ".kr" : ".kw" : ".ky" : ".kz" : ".la" : ".la" : ".la" : ".lb" : ".lc" : ".li" : ".lk" : ".lr" : ".ls" : ".ln" : ".lt" : ".lu" : ".lv" : ".ly" : ".ly" : ".ma" : ".mc" : ".md" : ".mg" : ".mh" : ".mil" : ".mk" : ".ml" : ".mm" : ".mn" : ".mo" : ".mp" : ".mq" : ".mr" : ".ms" : ".mt" : ".mu" : ".mu" : ".mw" : ".mx" : ".my" : ".mz" : ".na" : ".nc" : ".ne" : ".nf" : ".ng" : ".ni" : ".nl" : ".no" : ".np" : ".nr" : ".nt" : ".nu" : ".nz" : ".om" : ".pa" : ".pe" : ".pf" : ".pg" : ".pg" : ".pg" : ".ph" : ".pk" : ".pl" : ".pm" : ".pn" : ".pr" : ".pt" : ".pw" : ".py" : ".qa" : ".re" : ".ro" : ".ru" : ".rw" : ".sa" : ".sb" : ".sc" : ".sd" : ".se" : ".sg" : ".sh" : ".si" : ".sj" : ".sk" : ".sl" : ".sm" : ".sn" : ".so" : ".sr" : ".st" : ".su" : ".su" : ".sv" : ".sy" : ".sy" : ".sz" : ".tc" : ".td" : ".tf" : ".tg" : ".th" : ".tj" : ".tk" : ".tm" : ".tn" : ".to" : ".tp" : ".tr" : ".tt" : ".tu" : ".tw" : ".tz" : ".ua" : ".ug" : ".un" :  ".uy" : ".uz" : ".va" : ".va"
: ".vc" : ".ve" : ".vg" : ".vi" : ".vn" : ".vu" : ".wf" : ".ws" : ".ye" : ".yu" : ".za" : ".za" : ".zm" : ".zw" ;
@If((@Contains(@Trim(check);InternetAddressList ));
@Do(@If(@Prompt([YESNO];"Warning!!";"The Internet is an unsecured area, please do not send strictly confidential messages by the Internet - Yes to continue - No to cancel sending");@Success;@Set("InternetCheck";"No")));@Success);
@If (InternetCheck= "No";@Prompt([OK];"Warning";"Send Cancelled"): @Return("");"");