Hi remigiuszmarian,
If you are getting that sandbox solutions message, then it means that the form has code in it. Was the code added intentionally, or did you accidentally hit the "edit form code" button? Once you do this, it adds code to the form and requires publishing through the Sandbox or Central Admin. You may remove this if you wish to publish using the Form Library. Proceed to File > Info > Form Options > Programming > Remove Code.
But if you intend to keep it, you might need to publish it as an Administrator-approved form template. Or, you could try using a SharePoint Designer E-mail workflow.
As for the form name, what you can do is create a field which would contain the form name data and select this field at the SharePoint Library Submit connection (see image below). At the right side is a formula which is generated whenever the submit button has been clicked.

You may use a concat formula similar to this:
concat("Expense Report - ", today(), " - ", name)
Where "Expense Report - " is a text, today() is a formula for the date, and name is a field which means this would change whenever a different data is entered on the particular field. Hope this helps.