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
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.
<?lassoscript
define_tag: 'indx_exMailClean',
-required = 'mailAddr', -copy,
-encodenone;
// use copy just to ensure there is no conflict with another local
/*
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
indx_exMailClean(#yourEmailAddress)
indx_exMailClean('Bød Këw <bod@dom.tld>')
*/
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;
?>