Amirizaniani commited on
Commit
9361b6b
1 Parent(s): aa528db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -169,7 +169,7 @@ def process_inputs(llm, file, relevance, diversity, email):
169
 
170
  # Check network connectivity to the custom port
171
  try:
172
- socket.create_connection(("your.relay.server", 1024), timeout=10) # Replace with your relay server and port
173
  except OSError:
174
  return "Network is unreachable. Unable to send email."
175
 
@@ -194,7 +194,7 @@ def process_inputs(llm, file, relevance, diversity, email):
194
  message.attach(part)
195
 
196
  try:
197
- with smtplib.SMTP('your.relay.server', 1024) as server: # Use your relay server and custom port
198
  server.starttls() # Upgrade the connection to a secure encrypted SSL/TLS connection
199
  server.login(sender_email, sender_password)
200
  server.sendmail(sender_email, receiver_email, message.as_string())
 
169
 
170
  # Check network connectivity to the custom port
171
  try:
172
+ socket.create_connection(("your.relay.server", 2525), timeout=10) # Replace with your relay server and port
173
  except OSError:
174
  return "Network is unreachable. Unable to send email."
175
 
 
194
  message.attach(part)
195
 
196
  try:
197
+ with smtplib.SMTP('your.relay.server', 2525) as server: # Use your relay server and custom port
198
  server.starttls() # Upgrade the connection to a secure encrypted SSL/TLS connection
199
  server.login(sender_email, sender_password)
200
  server.sendmail(sender_email, receiver_email, message.as_string())