Switch to png as a plain boring attachment
In the body of the email, we can load the image direct from the site. Prolly gonna fail a lot but at least it's a loud known visible failure
This commit is contained in:
		
							parent
							
								
									018f7bef7a
								
							
						
					
					
						commit
						6770e83e5d
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		
							
								
								
									
										6
									
								
								vendor/regidesk/regidesk/views.py
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/regidesk/regidesk/views.py
									
										
									
									
										vendored
									
									
								
							|  | @ -201,7 +201,7 @@ def boarding_send(request): | |||
|             "user": user, | ||||
|             "checkin": user.checkin, | ||||
|             "code": user.checkin.code, | ||||
|             "qrcode": '<img src="cid:qrcode.png"/>', | ||||
|             "qrcode": user.checkin.qrcode, | ||||
|             "qrcode_url": request.build_absolute_uri( | ||||
|                 reverse("regidesk:checkin_png", args=[user.checkin.code])), | ||||
|         } | ||||
|  | @ -241,9 +241,7 @@ def boarding_send(request): | |||
|         if bpass.html_body: | ||||
|             msg.attach_alternative(bpass.html_body, "text/html") | ||||
| 
 | ||||
|         qrcode_image = MIMEImage(base64.b64decode(user.checkin.qrcode)) | ||||
|         qrcode_image.add_header('Content-ID', '<qrcode.png>') | ||||
|         msg.attach(qrcode_image) | ||||
|         msg.attach(filename="qrcode.png", content=user.checkin.qrcode, mimetype="image/png") | ||||
| 
 | ||||
|         if user in boarding_users: | ||||
|             with transaction.atomic(): | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 James Polley
						James Polley