Sending Email After Automatic Generation of Validated Invoice

Hello,

A little over a year ago, I created template invoices that automatically generate validated invoices through the scheduled task “Generate recurring invoices (sales)” and then send an email (with the invoice attached) to the respective client using the template “SendRecurringInvoiceByMail.” All of this was accomplished without any specific code.

I recently changed hosting providers and proceeded with the migration of my Dolibarr. Everything seemed to work well until I noticed that the automatic email sending of validated invoices is no longer functioning.

I started investigating and noticed that I no longer have access to the “Email Sending” page for each template invoice. I checked the “custom\sendrecurringinvoicebymail” directory in my new Dolibarr installation, and it was empty. Therefore, I have copied all files and directories from my old instance to the new one. This allowed me to regain access to the “Email Sending” page (see attachment). However, the problem is not resolved; the email still does not go out with the attached invoice, as it has been working for over a year now.

I tested other email sending, and everything works, so it’s not an issue with my SMTP server, and the invoices are generated correctly by the job.

I’m wondering if I made the right choice by simply copying the files from the “sendrecurringinvoicebymail” directory from my old instance to the new one, or if there’s a different process I should have followed.

Thank you in advance for your assistance.

Best regards,
Facture modèle - Envoi par courriel - Google Chrome

Hello,

I have identified the issue with the assistance of ons of the module developer:

  1. This is not a standard Dolibarr module. Therefore, if you are looking for a module to send emails with the invoice attached as a PDF after it is automatically generated, you can use this module: GitHub - bugness-chl/sendrecurringinvoicebymail: Dolibarr module to send recurring invoice by email All the steps are detailed there.
  2. My problem was related to the configuration of my SMTP server. I am unsure why the emails were coming out correctly in HTML mode but not in plain text mode. I reconfigured the correct settings, and since then, the module has been functioning properly again.

I hope this information proves helpful to you.

Please do not hesitate to reach out if you have any questions regarding usage.
Regards

1 Like