femanager icon indicating copy to clipboard operation
femanager copied to clipboard

Issues with plaintext emails because of missing/wrong(?) configuration

Open proseriox opened this issue 1 year ago • 0 comments

Hey folks,

I have encountered link issues when reading the html email as plaintext email.

Currently we are using the femanager v7.1.1 combined with TYPO3 v11.5.29 . When we register on our website, a confirmation email will be sent to the user. We use this template for the confirmation email: .../Templates/Email/CreateUserConfirmation.html - The HTML view looks fine and it also works correctly. See:

01

The html email links look like this:

Confirm Profile (Confirm Profile)

https://[DOMAIN]/register?tx_femanager_pi1%5Baction%5D=confirmCreateRequest&tx_femanager_pi1%5Bcontroller%5D=New&tx_femanager_pi1%5Bhash%5D=1d1372e9dc6257bb&tx_femanager_pi1%5Bstatus%5D=userConfirmation&tx_femanager_pi1%5Buser%5D=42462&cHash=[VALID-CHASH]

Delete profile (Delete profile)

https://[DOMAIN]/register?tx_femanager_pi1%5Baction%5D=confirmCreateRequest&tx_femanager_pi1%5Bcontroller%5D=New&tx_femanager_pi1%5Bhash%5D=1d1372e9dc6257bb&tx_femanager_pi1%5Bstatus%5D=userConfirmationRefused&tx_femanager_pi1%5Buser%5D=42462&cHash=[VALID-CHASH]

These links are valid and work perfectly.

However, if I change the email to a plain text email (Webmail Mittwald allows this - see the button image in the HTML mail), then the links are no longer valid.

image

Let's look at the links of the plain text email:

Confirm Profile (Confirm Profile)

https://[DOMAIN]/register?tx_femanager_pi1%5Baction%5D=confirmCreateRequest&tx_femanager_pi1%5Bcontroller%5D=New&tx_femanager_pi1%5Bhash%5D=1d1372e9dc6257bb&tx_femanager_pi1%5Bstatus%5D=userConfirmation&tx_femanager_pi1%5Buser%5D=42462&cHash=[VALID-CHASH]

Delete profile (Delete profile)

https://[DOMAIN]/register?tx_femanager_pi1%5Baction%5D=confirmCreateRequest&tx_femanager_pi1%5Bcontroller%5D=New&tx_femanager_pi1%5Bhash%5D=1d1372e9dc6257bb&tx_femanager_pi1%5Bstatus%5D=userConfirmationRefused&tx_femanager_pi1%5Buser%5D=42462&cHash=[VALID-CHASH]

Apparently, & becomes & and this causes:

image

Even in DDEV the plain text email looks weird:

image

In the line https://github.com/in2code-de/femanager/blob/develop/Classes/Domain/Service/SendMailService.php#L276 the .html file is read out but for plain text emails we should use .txt files. Should not we? This is how the core felogin:ext (forgot password) function works, I guess.

felogin - forgot pw - Test mail

HTML:

image

Plain Text:

image

In both cases the link is valid and the plaintext emails get the .txt file extension.

Am I missing something? Can you guys please take a look at this? It probably affects all emails.

proseriox avatar Jul 27 '23 13:07 proseriox