mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fix: #9800, don't send all welcome test emails to test@example.org @julianlam
This commit is contained in:
		| @@ -14,7 +14,6 @@ Email.test = async function (socket, data) { | ||||
| 		...(data.payload || {}), | ||||
| 		subject: '[[email:test-email.subject]]', | ||||
| 	}; | ||||
| 	let template; | ||||
|  | ||||
| 	switch (data.template) { | ||||
| 		case 'digest': | ||||
| @@ -34,15 +33,11 @@ Email.test = async function (socket, data) { | ||||
| 			break; | ||||
|  | ||||
| 		case 'verify-email': | ||||
| 			template = 'verify-email'; | ||||
| 			// falls through | ||||
|  | ||||
| 		case 'welcome': | ||||
| 			await userEmail.sendValidationEmail(socket.uid, { | ||||
| 				force: 1, | ||||
| 				email: 'test@example.org', | ||||
| 				template: template || 'welcome', | ||||
| 				subject: !template ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined, | ||||
| 				template: data.template, | ||||
| 				subject: data.template === 'welcome' ? `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]` : undefined, | ||||
| 			}); | ||||
| 			break; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user