Amirizaniani commited on
Commit
0743796
1 Parent(s): f49234d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -167,9 +167,9 @@ def process_inputs(llm, file, relevance, diversity, email):
167
  csv_file = "questions.csv"
168
  df.to_csv(csv_file, index=False)
169
 
170
- # Check network connectivity
171
  try:
172
- socket.create_connection(("smtp.gmail.com", 2525), timeout=10)
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('smtp.gmail.com', 2525) as server: # Port 2525 used for SMTP submission
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())
 
167
  csv_file = "questions.csv"
168
  df.to_csv(csv_file, index=False)
169
 
170
+ # Check network connectivity to the custom port
171
  try:
172
+ socket.create_connection(("your.relay.server", 1025), 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', 1025) 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())