Generate and send invoice/quote PDFs via mail composer

When utilizing the “Email PDF” feature within the Invoice/Quote modules and selecting an invoice email template, I’ve noticed that the inserted fields, such as $aos_invoices_invoice_date, fail to populate with their actual values.

Has anyone encountered a similar issue or have any insights into what might be causing this discrepancy? Any assistance or suggestions would be greatly appreciated.

How did you notice the inserted fields failed to populate with their actual values?

In Mail body the variables are not replaced with their values.

use pdf to email, all the variables is ok

Many thanks for your help, but what do you mean? I’m not sure I understand what you mean by 'use PDF to email.

Capture d’écran 2024-04-25 à 07.48.16
You can create a quote pdf and when you “Email pd” The pdf is the body mail

Many thanks, I know how to do this, but I want to create an “Email PDF” because I want to send invoices/quotes to our customers with attachments, and the body should come from the “EMAIL - TEMPLATES” module.

Personally, I use email pdf for the body of the mail . And I attach the attachment manually .

Thanks for your quick feedback. But I want to use another email template and send the invoice with attachments.

I hope someone have an idea.

The variables of email template are not as rich as the pdf template.
Also, they depend on the module from which the email is sent, if it is from the contact, we will be able to retrieve the name of the contact but not the information of an invoice or a quote (Or then I did not find)
That’s why I use the pdf email .

I least a can get info such as account name

You’re using the wrong variable. There is no account_name associated with a quotation. The field you’re using is when your sending an email to an account then you would use account_name. If however you are making an email template to send to the billing account on a quote, you must use the proper fields:


You can ONLY use variables from the Quotes module if you intend to send the email as quotes.

Same for invoices. You will need to create a specific email template because the variable for the billing account is:


1 Like