Jump to content

tosites

Members
  • Posts

    11
  • Joined

  • Last visited

tosites's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. How I can install some gems for ruby 2.4 version located at /usr/local/bin/ruby? Using cPanel I can install gems only for the default ruby 2.0. I need install gems for database server access, like: sqlite3, mysql2 and pg and mail gem too. How I can do that? Thanks.
  2. I had the same problem on Tommy. It was caused by a problem with cPanel and Ruby. It was solved by Krydos.
  3. Any update about the possibility to update ruby to 2.3.0 on Tommy server?
  4. Yes, for Tommy server. Sorry by forget to mention it.
  5. Please, could you upgrade ruby installation to 2.3.0? My scripts don't runs on 2.0.0. Thank you for your help.
  6. Worked with localhost. Thank you very much. I tested calling directly with: http://server.heliohost.org/cgi-bin/send.py?name=A&email=B&subject=C&message=D And it is sending the email. Thanks again.
  7. Using the script below: #!/usr/bin/python # Import modules for CGI handlingimport cgi, cgitb # Import modules for email handlingimport smtplib # set header for cgiprint "Content-Type: text/html\n\n" # Create instance of FieldStorageform = cgi.FieldStorage() # Get data from fieldsname = form.getvalue('name')email = form.getvalue('email')subject = form.getvalue('subject')message = form.getvalue('message') # Send emailreceivers = ['email@gmail.com'] text = "From: me\n" + "To: Contact <email@gmail.com>\n" + "Subject: " + subject + "\nFrom: " + name + " <" + email + ">\n" + message + "\n" try:server = smtplib.SMTP("localhost")#'smtp.gmail.com', 587)server.sendmail("contact@server.heliohost.org", "email@gmail.com", text) #server.starttls()#server.login("email@gmail.com", "password")#server.sendmail("email@gmail.com", receivers, text)server.quit()#print "Successfully sent email"except:#print "Error: unable to send email"pass And I am still getting error 500 I tested and I am passing the right values for variables from form. If I execute the script as a regular program at my machine passing the values copied from alert dialog box the message is sent. I don't know why it is not working inside Apache.
  8. No. The same error occur using this lines that I have when I read the values from my form.
  9. The value of variables came from a form at my site. That is not being my problem but an error 500 (internal error) on server. this is the result: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at webmaster@server to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> <p>Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html>
  10. I can send the email when I run the script at my own computer using the Gmail account, but not when I run at server. Of course, I could not test with the email server from the helionet. I have the same site running over Apache at my Mac and the email is sent but the uploaded version give an error 500. Of course, the email accounts used at this example is not the real ones at my script. Thanks for your attention.
  11. I'm trying to send a contact form by mail using a python script but I'm getting a server error 500. Can you help me please saying what is wrong and how to configure correctly? When I execute the script at my own computer it works ok with the Gmail but when I execute at server nor Gmail or my own mail server works to send the email. PS: With Gmail it is necessary to use server.starttls(). Thanks for your help. I'm posting the script below: #!/usr/bin/python # Import modules for CGI handlingimport cgi, cgitb # Import modules for email handlingimport smtplib # Create instance of FieldStorageform = cgi.FieldStorage() # Get data from fieldsname = form.getvalue('name')email = form.getvalue('email')subject = form.getvalue('subject')message = form.getvalue('message') # Send emailreceivers = ['email@gmail.com'] text = "From: me\n" + "To: Contact <email@gmail.com>\n" + "Subject: " + subject + "\nFrom: " + name + " <" + email + ">\n" + message + "\n" try: server = smtplib.SMTP(localhost) #'smtp.gmail.com', 587) #server.starttls() server.login("contact@server.heliohost.org", "password") server.sendmail("contact@server.heliohost.org", receivers, text) #"email@gmail.com", receivers, text) server.quit()except: pass
×
×
  • Create New...