namkuner commited on
Commit
688f2d2
·
verified ·
1 Parent(s): 939af29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ def send_email(subject, body):
21
 
22
  # Gửi email qua SMTP server
23
  try:
24
- with smtplib.SMTP_SSL('smtp.gmail.com', 465) as server:
25
  server.login(sender_email, password)
26
  server.sendmail(sender_email, receiver_email, msg.as_string())
27
  print("Email sent successfully.")
@@ -52,7 +52,7 @@ def run_monitoring():
52
 
53
  while True:
54
  check_url_for_value(url, target_value)
55
- time.sleep(120) # Chờ 1 phút
56
  # Press the green button in the gutter to run the script.
57
  if __name__ == '__main__':
58
  run_monitoring()
 
21
 
22
  # Gửi email qua SMTP server
23
  try:
24
+ with smtplib.SMTP_SSL('smtp.gmail.com', 587) as server:
25
  server.login(sender_email, password)
26
  server.sendmail(sender_email, receiver_email, msg.as_string())
27
  print("Email sent successfully.")
 
52
 
53
  while True:
54
  check_url_for_value(url, target_value)
55
+ time.sleep(10) # Chờ 1 phút
56
  # Press the green button in the gutter to run the script.
57
  if __name__ == '__main__':
58
  run_monitoring()