There is an automatic feature for file attachments in your email. If you use the attach file option when configuring your UE server behavior you do not need to configure any additional server behaviors. The file will upload and be attached to the message.