Password not being sent in mails

I’ve tested with a quotation and for some reason the password isn’t being sent so I edited the invoice, quotation and reminder mails to all include the following line of code:
Password: $password

But all it sends is "Password: "

What do I need to do to get it to display in the mails please…?

The $password field is only set if the password is being auto-set by the app.

Note: ‘Generate Password Automatically’ needs to be enabled on /settings/client_portal

Thanks Hillel

This is set, that’s what’s confusing me.

I created a quotation, sent it to the client but no password was in the mail.

I then went into each template and put the code in manually but still no dice.

What I would like is for the password to be sent on EVERY communication too as customers, well, they’re busy. I don’t want unpaid invoices because they were too busy to note the password.

Is the client’s password already set? I believe it’s only included in the email if the password is being generated.

Thanks for the quick response Hillel

Yes it is. Here’s the odd thing… Customers being customers I synchronise their main login for the main website with the billing system so they only need one username and password.

I set the password manually for EVERY client within Invoice Ninja.

Ok, I guess that explains why the password isn’t being sent.

OK, that sounds a bit cryptic. Why might it be…?

For security reasons the app doesn’t send existing passwords in plain text.

The password is only included if it’s first being set by the app.

Mmmm… OK.

So, what would you suggest…? I remove all passwords from all clients (iI’d have to do this through the database) or hack the core code to force it to send the password…?

If you’re setting the passwords and don’t mind the values being readable you could set the password in a custom field and then include it in the template.