mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Fix fmt error in mailer (#2490)
This commit is contained in:
		
				
					committed by
					
						 Lunny Xiao
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							01d7189c2d
						
					
				
				
					commit
					eab4579e17
				
			| @@ -42,7 +42,7 @@ func NewMessageFrom(to []string, from, subject, body string) *Message { | ||||
|  | ||||
| 	plainBody, err := html2text.FromString(body) | ||||
| 	if err != nil || setting.MailService.SendAsPlainText { | ||||
| 		if strings.Contains(base.TruncateString(body, 100), "<html>"){ | ||||
| 		if strings.Contains(base.TruncateString(body, 100), "<html>") { | ||||
| 			log.Warn("Mail contains HTML but configured to send as plain text.") | ||||
| 		} | ||||
| 		msg.SetBody("text/plain", plainBody) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user