GrupeDL Posted September 2, 2022 Report Share Posted September 2, 2022 I can't send email through gmail from my installation on a Raspberry pi. Google says they have blocked third parties from sending email through their servers, unless you have a special key. When set to require authentication, TNG never connects, and locks up. When set to none, it says email sent, but is never received. Quote Link to comment Share on other sites More sharing options...
edglimited Posted September 2, 2022 Report Share Posted September 2, 2022 The Raspberry pi issues crop up from time to time. If you search for "Raspberry pi" there are several articles on common / not-common, mistakes, errors etc. I do recall another forum where someone was asking the same question that you have just asked. I believe from memory, he was using Google Chrome and that was causing his problem through sending mail with G-Mail. Google is your best bet. EDIT: I forgot I had this bookmarked. Just stumbled across it. It might help. Raspberry Pi Email Issues Quote Link to comment Share on other sites More sharing options...
GrupeDL Posted September 3, 2022 Author Report Share Posted September 3, 2022 (edited) I have a program on my pi that sends registration info to someone wanting to register. I have tried the app password thing with a new gmail account. It will not connect to Google. I have tried various settings to no avail. I will contact the writer of the program, to see if he has any suggestions. Thank you for the info you provided. OOps, I have been looking at various forums, and didn't realize this was actually in the TNG forum! Edited September 3, 2022 by GrupeDL added info Quote Link to comment Share on other sites More sharing options...
GrupeDL Posted September 7, 2022 Author Report Share Posted September 7, 2022 Looking at the logs, I see I am actually connecting to Google's email servers, but it then fails to send the message. This is the log file: DEBUG: setDebug: JavaMail version 1.5.5 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle] DEBUG SMTP: need username and password for authentication DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 587, isSSL false 220 smtp.gmail.com ESMTP hf9-20020a05622a608900b00342fb07944fsm6865986qtb.82 - gsmtp DEBUG SMTP: connected to host "smtp.gmail.com", port: 587 EHLO XXXXXXXX (My computer name) 250-smtp.gmail.com at your service, [0.0.0.0] (My IP address) 250-SIZE 35882577 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-PIPELINING 250 SMTPUTF8 DEBUG SMTP: Found extension "SIZE", arg "35882577" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "STARTTLS", arg "" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "PIPELINING", arg "" DEBUG SMTP: Found extension "SMTPUTF8", arg "" STARTTLS 220 2.0.0 Ready to start TLS An error has been detected while trying to send the email. Check the network settings and the email notification configuration. Quote Link to comment Share on other sites More sharing options...
edglimited Posted September 7, 2022 Report Share Posted September 7, 2022 Going by your log, you are setup through SMTP..????? If you connect using SSL or TLS, you can send mail to anyone inside or outside of your organization using smtp.gmail.com as your server. That option requires you to authenticate with the Gmail or Google Workspace account and passwords. ie;: DEBUG SMTP: "need username and password" for authentication. You might want to change your settings and try IMAP / POP. IMAP is ideal if you use more than one device to communicate, ie; mobile / cell, computer, laptop, tablet, another computer etc... POP is the easiest to setup in your case, as it seems most of your emailing is, or will be done through Raspberry. Quote Link to comment Share on other sites More sharing options...
GrupeDL Posted September 7, 2022 Author Report Share Posted September 7, 2022 My error! I am working with two different email application problems. The log I posted is for a different, Windows, application. Trying to send from TNG, locks up. I have to reboot the pi to get out of it. Does TNG create a log file? I found the settings, but can't find an actual log. sorry for the miss leading info! Quote Link to comment Share on other sites More sharing options...
edglimited Posted September 7, 2022 Report Share Posted September 7, 2022 11 minutes ago, GrupeDL said: My error! I am working with two different email application problems. The log I posted is for a different, Windows, application. Trying to send from TNG, locks up. I have to reboot the pi to get out of it. Does TNG create a log file? I found the settings, but can't find an actual log. sorry for the miss leading info! It's all good, we all make tiny errors. I can't answer your question, as I do not use TNG to send any email etc, although, they have an SMTP option, in Admin >> Setup >> General Settings >> Mail and Registration. (see attachment). All my Company Email Acct's are setup through our Server using SMTP, TLS/SSL. Someone else may know how to point you in the right direction, logs etc. Quote Link to comment Share on other sites More sharing options...
bhemph Posted September 8, 2022 Report Share Posted September 8, 2022 To debug the email and get a log, you have to edit tngmaillib.php. Inside the try start it with $mail->setDebugLevel(4); This will output the logs in the most verbose way to the browser. Sending a suggestion or comment is the simplest way to test. https://netcorecloud.com/tutorials/send-an-email-via-gmail-smtp-server-using-php/ is a page that explains a bit of the settings and errors that you may see in the logs. Brent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.