mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 19:12:26 -05:00 
			
		
		
		
	[feature/frontend] Let admins send test email to validate SMTP config (#2934)
* [feature/frontend] Let admins send test email to validate SMTP config * wee
This commit is contained in:
		
					parent
					
						
							
								1e7b32490d
							
						
					
				
			
			
				commit
				
					
						a276b1ca06
					
				
			
		
					 18 changed files with 276 additions and 52 deletions
				
			
		|  | @ -54,6 +54,12 @@ import ( | |||
| //		in: formData | ||||
| //		description: The email address that the test email should be sent to. | ||||
| //		type: string | ||||
| //		required: true | ||||
| //	- | ||||
| //		name: message | ||||
| //		in: formData | ||||
| //		description: Optional message to include in the email. | ||||
| //		type: string | ||||
| // | ||||
| //	security: | ||||
| //	- OAuth2 Bearer: | ||||
|  | @ -115,7 +121,12 @@ func (m *Module) EmailTestPOSTHandler(c *gin.Context) { | |||
| 		return | ||||
| 	} | ||||
| 
 | ||||
| 	errWithCode := m.processor.Admin().EmailTest(c.Request.Context(), authed.Account, email.Address) | ||||
| 	errWithCode := m.processor.Admin().EmailTest( | ||||
| 		c.Request.Context(), | ||||
| 		authed.Account, | ||||
| 		email.Address, | ||||
| 		form.Message, | ||||
| 	) | ||||
| 	if errWithCode != nil { | ||||
| 		apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) | ||||
| 		return | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue