Disable smtp_use_tls with false instead of empty string (#1184)
				
					
				
			`smtp_use_tls = bool(os.environ.get("EMAIL_SMTP_USE_TLS", True))` would only disable tls when `EMAIL_SMTP_USE_TLS` is set to an empty string which is not intuitive
			
			
This commit is contained in:
		
							parent
							
								
									e93f195d59
								
							
						
					
					
						commit
						cabf4ccc21
					
				| @ -17,7 +17,9 @@ class EmailSender: | ||||
|         self.reply_to = os.environ.get("EMAIL_REPLY_TO") or self.sender | ||||
|         self.smtp_server = os.environ.get("EMAIL_SMTP_HOST") | ||||
|         self.smtp_port = int(os.environ.get("EMAIL_SMTP_PORT", 587)) | ||||
|         self.smtp_use_tls = bool(os.environ.get("EMAIL_SMTP_USE_TLS", True)) | ||||
|         self.smtp_use_tls = ( | ||||
|             os.environ.get("EMAIL_SMTP_USE_TLS", "true").lower() != "false" | ||||
|         ) | ||||
| 
 | ||||
|         self.default_origin = os.environ.get("APP_ORIGIN") | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user