stages/email: prevent authentik emails from being marked as spam (also add text template support) (#7949)
* use <> style email address with name Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add support for text templates Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix icon display in event log Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add text email templates Signed-off-by: Jens Langhammer <jens@goauthentik.io> * update docs, update email screenshot Signed-off-by: Jens Langhammer <jens@goauthentik.io> * prevent prettier from breaking example template Signed-off-by: Jens Langhammer <jens@goauthentik.io> * Optimised images with calibre/image-actions * Apply suggestions from code review Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Signed-off-by: Jens L. <jens@beryju.org> * reword docs Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Signed-off-by: Jens L. <jens@beryju.org> Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com> Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
		@ -461,7 +461,7 @@ class NotificationTransport(SerializerModel):
 | 
			
		||||
            }
 | 
			
		||||
        mail = TemplateEmailMessage(
 | 
			
		||||
            subject=subject_prefix + context["title"],
 | 
			
		||||
            to=[notification.user.email],
 | 
			
		||||
            to=[f"{notification.user.name} <{notification.user.email}>"],
 | 
			
		||||
            language=notification.user.locale(),
 | 
			
		||||
            template_name="email/event_notification.html",
 | 
			
		||||
            template_context=context,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user