jaymzh / pius

PGP Individual User Signer
Other
97 stars 25 forks source link

Overriding the default mail doesn't replace placeholder statements correctly #23

Closed wget closed 8 years ago

wget commented 8 years ago

I decided to replace the default mail used by pius and specify mine instead. I have kept most of the structure, and have just changed some sentences. But after doing some test, I realized statements like <keyid>, <signer>, <email> and <file> where not replaced with the appropriate strings, like this is the case with the default mail template.

I also realized that the statement <file> present in the default template is never (AFAIK) replaced. My tests confirm this issue, the code mailer.py#L107 as well (no <file> statement) and no file parameter to the method _get_email_body.

wget commented 8 years ago

Ok. I have found the issue why by reading source code. I had to replace statements like <email> by %(email)s. I'm now trying to implement the <file> statement as it isn't implemented at all.

jaymzh commented 8 years ago

Ah. Yeah - we show what would be there, not the string-replace text. We need some documentation on how to properly create one of these.

However <file> isn't meant to be replaced at all - that's "whatever you call the file when you save it" - the <> is there for the recipient of the email, not the user of PIUS.