We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I've found this topic: https://processing.org/discourse/beta/num_1204669725.html for sending emails (example of Daniel Swiffmann).
If I use the code, I get a mail of Google which sais:
Sign-in attempt blocked
Someone just tried to log into your Google account ******@gmail.com from an application that does not meet modern safety standards.
Is there a code which does work in Processing 3?
Thanks, Daantje
Answers
I think Google has to give permission to apps to access email. Like, if you setup outlook with your google Mail account, it brings you too a page which says "Do you want to allow this app to access your data?" And stuff like that. So I think it is google that is not working with the app. If you have an email from a different provider, try that? Hope this helps. :)
Hey @Repet you're right on with the suggestion, is it fine if I do a little touch up to that answer (just because I did this really recently) so @Daantje what @Repet said is totally correct, now what you're going to do is sign in to your Gmail account, then afterwards just search on google, "less secure apps third party" and you will see one of the first ones as your answer, it will literally say "Less secure apps - Google" or something like that. Or you can just go to your account, go to Settings, then Security, then Less secure Apps. All you have to do is turn off that security feature. GMail will freak out that you want to do it, but just say that You're sure and let it work it's magic. Yeah it can be a very frustrating problem indeed, and I found this answer by accident, it took me such a long time! If you need any help with JavaMail be sure to message me (because again I did a pretty big project with it recently) and I'll do my best to help.
@Repet, thanks for your answer. I only have an email account at Gmail, no Outlook or so.
@TechWiz777, thanks for your help. I am going to try your answer, hope it will work... :D
Regards, Daantje
---------- ---------- Edit: ---------- ----------
Thank you so much! I almost gave it up, but it works very good now! Wow, I was searching for this problem for a few weeks, but I didn't thought it was so 'simple' (just accept it in my Google account)...
Thanks! :-)
@Daantje Could you post a working sample? Did you use the javax/mail lib? I am interested in this as well.
Kf
@kfrajer, of course:
First tab (name: save_attachment.pde)
Second tab (name: Auth.pde)
Third tab (name: MailStuff.pde)
Downloads
You also have to download the JavaMail library: http://www.oracle.com/technetwork/java/javamail/index-138643.html
If you download it, you will get a folder with lots of files. Only the .JAR file named 'mail.jar' is necessary. In Processing under the 'Sketch' tab, you can select 'Add file' or something like that. You will get a window to select the downloaded 'mail.jar' file.
Last but not least
You also have to do the things @TechWiz777 said: You have to allow "yourself" in your own Gmail account to use less secure apps. For a discription about this, you can use the page from Google itself: https://support.google.com/accounts/answer/6010255?hl=en
If you have any questions, ask them and I will help you.
Regards, Daantje
Thanks for posting @Daantje. I will try it out tonight!
Kf
Fancy code :)