Page 1 of 1

Email addresses with variables

Posted: Tue Dec 05, 2023 12:13 pm
by deesloop
Is it possible to use variables in email addresses??

I want to grab the first few characters (based on the position of a "-" delimiter) of a filename and assign that text to a variable sendto then send an email to {sendto}@mydomain.net

It fails every time with a bad email address but the address is valid and I'm not sure if the variable is being passed or whether it's just the actual text {sendto}@mydomain.net address that is being passed

Thanks

Re: Email addresses with variables

Posted: Tue Dec 05, 2023 1:32 pm
by Oleg
Yes, you can use use variables in recipient address. It works, I just tested this
You can set to variable SendTo the username and next use it in address {SendTo}@mydomain.net

This mist work if your variable does not break syntax of email address.
Try to output the expression {SendTo}@mydomain.net. Maybe it contains some prohibited symbols: linebreaks, spaces and others

Re: Email addresses with variables

Posted: Tue Dec 05, 2023 4:08 pm
by deesloop
Yes, it worked for sure. I had used {sendto}@mydomain.net and although my string manipulation was working I couldn't get it to work
I created a new task and it worked first time so can only assume I had done something daft.

Thanks for your quick response