Lasso Soft Inc. > Home

[indx_exMailClean]

Linkindx_exMailClean
AuthorClive Bruton
CategoryString
Version8.x
LicensePublic Domain
Posted20 May 2009
Updated20 May 2009
More by this author...

Description

Tag cleans-up an email address string which has extended characters in it Lasso < 8.5 produces an invalid address form when such characters occur and the subsequent email gets stuck in the SMTP queue table. This essentially requires quoting of the "name" portion of the email string, expects an email address in the form: Your Name

Sample Usage

indx_exMailClean(#yourEmailAddress)
indx_exMailClean('Bød Këw ')
indx_exMailClean(-mailAddr='Bød Këw ')

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

')			
		*/
		
		if: #mailAddr >> '"';
			// Has quoted text, probably safe
			//#mailAddr += ' has quotes'; // debug line
		else: #mailAddr >> '<' && #mailAddr >> '>';
			// Contains angle brackets
			#mailAddr = output('"', #mailAddr);
			#mailAddr->(replace: '<', '" <');
			//#mailAddr += ' has angle brackets'; // debug line
		/if;
		
		return: #mailAddr;
	
	/define_tag;		
?>

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft