I have solved the problem with the following update script
I have copied all the attachments from the folder media/com_acymailing/upload to media/com_acym/upload.
Then is changed the database field attach a:1:{i:0;O:8:\"stdClass\":3:{s:%:\"filename\";s%%:\"media/com_acymailing/upload/document.xls\";s:4:\"size\";i:25600;s:%:\"extension\";s:%:\"xls\";}}
to [{"filename":"media\/com_acym\/upload\/Document.doc","size":25600}]
Multiple attachments were added like [{"filename":"media\/com_acym\/upload\/Document.xls","size":25600},{"filename":"media\/com_acym\/upload\/Document2.doc","size":22800}]
UPDATE `jos_acym_mail` SET `attachments`='[{ "filename" : "media/com_acym/upload/Document1.pdf", "size" : 1222893}]' WHERE `id` = 95;
UPDATE `jos_acym_mail` SET `attachments`='[{ "filename" : "media/com_acym/upload/Document2.pdf", "size" : 3057209},{ "filename" : "media/com_acym/upload/Document3.docx", "size" : 38579}]' WHERE `id` = 96;
Acymailing v5 uses the fieldname attach
and Acymailing v7 uses the fieldname attachments
Acymailing v5 uses the fieldname mailid
and Acymailing v7 uses the fieldname id