Attachment is attached to message by message id. So before sending message we can not know message id.
Why you need upload attachment before sending message? Attachment check (size, amount etc) is done before sending message. So if that check fail that will automatically fail message sending.
Also it seems you are not using latest version of this plugin. It is always recommended to use latest version.