diff --git a/src/main/java/eu/dnetlib/apps/oai/utils/EmailSender.java b/src/main/java/eu/dnetlib/apps/oai/utils/EmailSender.java index 4d61f9c..e20957c 100644 --- a/src/main/java/eu/dnetlib/apps/oai/utils/EmailSender.java +++ b/src/main/java/eu/dnetlib/apps/oai/utils/EmailSender.java @@ -88,9 +88,11 @@ public class EmailSender { if (StringUtils.isNotBlank(info.getNotificationEmail())) { final String to = info.getNotificationEmail(); if (info.getExecutionStatus() == ExecutionStatus.COMPLETED) { - sendMail(to, "OAI Harvesting completed", prepareMessage("email/success", info)); + final String subject = String.format("Success Notification: Metadata Collection Request (ID: %s)", info.getId()); + sendMail(to, subject, prepareMessage("email/success", info)); } else { - sendMail(to, "OAI Harvesting completed", prepareMessage("email/failure", info)); + final String subject = String.format("Failure Notification: Metadata Collection Request (ID: %s)", info.getId()); + sendMail(to, subject, prepareMessage("email/failure", info)); } } } diff --git a/src/main/resources/templates/email/failure.html b/src/main/resources/templates/email/failure.html index e485a0c..cb31243 100644 --- a/src/main/resources/templates/email/failure.html +++ b/src/main/resources/templates/email/failure.html @@ -1,22 +1,31 @@ - OAI Harvesting Failed + Failure Notification

- Hi,

- your request (ID: ) to collect metadata from
-
- is failed for the following error:
-


+			Dear ,
 			

- Detailed information are available invoking the following API: -
-

- Best Regards. + I hope this email finds you well. + I regret to inform you that your request to collect metadata from the provided URL was not completed successfully.
+ Request ID:
+ URL:

+

+ We encountered an unexpected issue while processing your request, and as a result, the metadata collection could not be completed. We apologize for any inconvenience caused. + Should you require more detailed information, please feel free to invoke the following API: +
+
+

+

+ If you have any further questions or need assistance, please don't hesitate to reach out. We are here to help!

+ Best Regards,

+ EOSC Metadata Harvester daemon
+

+
-

This is an automatically generated message. Please do not reply.

+ +

Note: This is an automatically generated message. Please do not reply directly to this email.

diff --git a/src/main/resources/templates/email/success.html b/src/main/resources/templates/email/success.html index b8ec3cb..2643998 100644 --- a/src/main/resources/templates/email/success.html +++ b/src/main/resources/templates/email/success.html @@ -1,29 +1,34 @@ - OAI Harvesting Completed + Success Notification

- Hi,

- your request (ID: ) to collect metadata from
-
- has been completed successfully.
-

+ Dear , +

+ I hope this email finds you well. + I am writing to inform you that your request to collect metadata from the provided URL has been completed successfully.
+ Request ID:
+ URL:
+

+

- You can download your file at the address:
- -
+ You can now download your file by visiting the following address:
+

- Detailed information are available invoking the following API:
+

+ Should you require more detailed information, please feel free to invoke the following API:

-

- -

Best Regards.

+

+ If you have any further questions or need assistance, please don't hesitate to reach out. We are here to help!

+ Best Regards,

+ EOSC Metadata Harvester daemon
+


-

This is an automatically generated message. Please do not reply.

+

Note: This is an automatically generated message. Please do not reply directly to this email.