Need help with multi-select deluge

Need help with multi-select deluge

Hi
I've been struggling with deluge for a multi-select lookup field.

I've two forms- "Email_Recepient" and "Miscellaneous_Settings". "Email_To" is a multi-select field in "Miscellaneous_Settings" which is a lookup on "Recipient_Email" field in "Email_Recepient". 

"Recipient_Email" is the other field in "Email_Recepient".

Idea is to let the client decide whom they want emails to be sent to for each submission (of a third form) by collecting the emails in a "Multi_Line" field in "Miscellaneous_Settings" based on the selections in the multi-select field and passing this as an argument to SendMail deluge of the said third form. 

I've written the following script to On User input of the multi-select field "Email_To" but it is not getting any result in the "Multi_Line" field.

Kindly help me by pointing any shortcomings in the below script.

X="";
for each Email_To E in Miscellaneous_Settings [Auto_Number = input.Auto_Number]
{
X=X + E.Recipient_Email;
}
Multi_Line=X;