
    +`j                     T    d dl Z d dlZd dlmZ  e j                  e      ZdZdefdZ	y)    N)settingsa  
<table cellpadding="0" cellspacing="0"
style="border:1px solid #e0e0e0;max-width:600px;margin:auto;font-family:Arial,Helvetica,sans-serif;color:#333333;font-size:13px"
width="100%">
<tbody>
<tr style="width:100%">
<td style="margin:0px;background:#20638f;padding:0px 20px 0px">
<p style="width:46%;float:left;padding:0px;margin:10px 0px 8px;text-align:left">
<img src="https://www.lodgingsystem.com/ls-api/assets/uploads/email/minerva3_logo.png"
alt="Lodging system" title="Lodging system" style="width:66%;min-width:180px">
</p>
<div style="width:auto;float:right;color:#fff;padding:0px 0px">
<p style="width:100%;float:left;padding:6px 0px;margin:0;text-align:right">
<img src="https://www.lodgingsystem.com/ls-api/assets/img/email-templates/res_can.png"
alt="Reservation created" title="Reservation created" style="width:30px">
</p>
</div>
<span style="padding:0px;margin:0;margin-bottom:10px;text-align:left;font-size:14px;float:left;width:100%">
<span style="width:auto;color:#fff">A new cancellation request has been received
</span>
</span>
</td>
</tr>
<tr>
<td align="center" style="padding:30px 20px 20px;">
 
<!-- Cancel Image -->
<img src="https://www.lodgingsystem.com/ls-api/assets/img/email-templates/cancel-img.png" alt="Reservation Cancel Request" width="200"
style="display:block;max-width:200px;width:100%;margin:0 auto;">
 
<!-- Heading -->
<div
style="font-family:Arial, Helvetica, sans-serif;font-size:20px;line-height:24px;font-weight:700;color:#20638f;text-align:center;margin-top:16px;">
A guest requested to cancel<br>
their reservation through the chatbot.
</div>
 
<!-- Divider -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"
style="max-width:400px;margin-top:20px;margin-bottom: 20px;">
<tr>
<td height="1" style="background:#DCE5EF; line-height: 0px;"></td>
</tr>
</table>
 
<!-- Confirmation Number Box -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"
style="max-width:500px;border:1px solid #DCE5EF;border-radius:8px;background:#FFFFFF;">
<tr>
<td style="padding:18px;">
 
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
 
<!-- Icon -->
<td width="70" valign="middle">
<div style="
text-align:center;
line-height:60px;
">
<img src="https://www.lodgingsystem.com/ls-api/assets/img/email-templates/confirmation-icon.png" width="60"
style="vertical-align:middle;">
</div>
</td>
 
<!-- Text -->
<td valign="middle" style="
font-family:Arial, Helvetica, sans-serif;
">
<div style="
font-size:16px;
color:#3D434C;
font-weight:700;
margin-bottom:8px;
">
Confirmation Number:
</div>
 
<div style="
font-size:18px;
color:#20638f;
font-weight:700;
">
{confirmation_number}
</div>
</td>
 
</tr>
</table>
 
</td>
</tr>
</table>
 
<!-- Bottom Divider -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width:400px;margin-top:20px;">
<tr>
<td height="1" style="background:#DCE5EF; line-height: 0px;"></td>
</tr>
</table>
 
<!-- Footer Text -->
<div style="font-family:Arial, Helvetica, sans-serif;font-size:16px;line-height:24px;color:#5F6773;text-align:center;margin-top:20px;">
Please review this reservation and contact the guest if necessary.<br>
This request was forwarded automatically by the chatbot.
</div>
 
</td>
</tr>


<tr style="width:100%">
<td style="margin:0px;background:#20638f;padding:0px 20px 0px">
<p style="width:100%;padding:0px;margin:10px 0 5px;text-align:center;font-size:16px;color:#fff">
<span>Thanks For Choosing</span>
</p>
<p style="width:100%;float:left;padding:0px;margin:0px 0px 8px;text-align:center">
<img src="https://www.lodgingsystem.com/ls-api/assets/uploads/email/minerva3_logo.png" width="150px"
alt="Lodging system" title="Lodging system" style="width:150px" class="CToWUd">
</p>
</td>
</tr>
 
</tbody>
</table> 
confirmation_numberc                   K   	 t         j                  }t         j                  }d| d}d|  }t         j                  t         j                  g|t
        j                  |       d}t        j                  d      4 d {   }|j                  |d|f|	       d {   }d d d       d {    j                  d
v ryy7 B7 &7 # 1 d {  7  sw Y   (xY w# t        $ r"}t        j                  d|        Y d }~yd }~ww xY ww)Nzhttps://api.mailgun.net/v3/z	/messagesz#Reservation Cancellation Request - )r   )fromtosubjecthtmlg      N@)timeoutapi)authdata)      TFzError sending email: )r   MAILGUN_DOMAINMAILGUN_API_KEY
FROM_EMAILFRONTDESK_EMAILmessageformathttpxAsyncClientpoststatus_code	Exceptionlogerror)	r   domainapi_keyurlr   r   clientresponsees	            </var/www/html/ls-ibe-bot-apis/app/agents/tools/send_email.py
send_emailr$      s	    ((**+F89=78K7LM ''++,NN7JNK	
 $$T22f#[[W% )  H 32 :- 3 3222  		)!-.s   DA=C CC C
C C
$C /C0C DC C
C 
CCCC 	D
(D DD

D)
loggingr   app.configsr   	getLogger__name__r   r   strr$        r#   <module>r,      s5       g!}~# r+   