In most Nextcloud email templates, user-specific variables like the recipient’s name can be accessed using placeholders, though the exact variable depends on the notification type and what data is passed to the template.
If you’re modifying a sharing notification template, look for variables like {{recipient.displayName}} or {{sharee.displayName}}. Sometimes it might just be {{displayName}} depending on the context. If those don’t work, you may need to check the corresponding PHP code or log the available variables in the template for debugging.
To include the recipient’s name, you’ll typically want to use the recipientDisplayName variable if it’s available in your template context. Depending on your Nextcloud version or how the notification system is set up, this might already be passed into the template. If not, you may need to dig into the PHP code responsible for building the email context and add it manually.
Also, if you’re customizing emails, don’t forget to consider how things like signature integration can help personalize and professionalize your outgoing messages further.