de38d70df0af5968b94ee1f482d2acab4d17baac — emerson 17 days ago b68ef80
Add reply to option
2 files changed, 5 insertions(+), 0 deletions(-)

M dronebl/config.example.yaml
M dronebl/dronebl_check_tickets.py
M dronebl/config.example.yaml => dronebl/config.example.yaml +1 -0
@@ 14,6 14,7 @@ email_password: something
 email_from: something
 email_domain: something
 email_bcc: something
+email_reply_to: something
 email_inactive: |
   Hello,
   The DroneBL entry for {} has been removed.

M dronebl/dronebl_check_tickets.py => dronebl/dronebl_check_tickets.py +4 -0
@@ 30,6 30,8 @@ def send_active_email(ticket, details):
 	}
 	if config.get("email_bcc"):
 		data["bcc"] = config["email_bcc"]
+	if config.get("reply_to"):
+		data["h:Reply-To"] = config["email_reply_to"]
 
 	requests.post(f"https://api.mailgun.net/v3/{config['mg_domain_name']}/messages",
 			auth=auth_api, data=data)


@@ 44,6 46,8 @@ def send_inactive_email(ticket):
 	}
 	if config.get("email_bcc"):
 		data["bcc"] = config["email_bcc"]
+	if config.get("reply_to"):
+		data["h:Reply-To"] = config["email_reply_to"]
 
 	requests.post(f"https://api.mailgun.net/v3/{config['mg_domain_name']}/messages",
 			auth=auth_api, data=data)