Yep, TLS and the correct port.

Jim Oberholtzer
Agile Technology Architects



On May 18, 2020, at 5:34 PM, Kevin Adler <kadler@xxxxxxxxxx> wrote:

 I would also make sure you've told Python to enable TLS on the connection
as I don't believe Google supports unsecured authentication.


----- Original message -----
From: Jim Oberholtzer <midrangel@xxxxxxxxxxxxxxxxx>
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] Re: [IBMiOSS] Send mail via a google account from
python
Date: Mon, May 18, 2020 5:24 PM

Thanks Kevin

The method you posted below is what I’m using, google tells the app to
go pound sand. I suspect the key is that app password portion of the
post you point out. I’ll try that in the AM.

The part that does cause me some pause is IBM i is happily sending email
with that account with no issues.

Jim Oberholtzer
Agile Technology Architects

On May 18, 2020, at 5:05 PM, Kevin Adler <kadler@xxxxxxxxxx> wrote:

 IIRC, the only tricky thing you need is to get an APP password for
the
account you're using.

This article shows how to do it using pure Python:

[1][1]https://stackabuse.com/how-to-send-emails-with-gmail-using-python/

I'm guessing the same would work for Flask-Mail by setting

MAIL_SERVER to smtp.gmail.com
MAIL_PORT to 465
MAIL_USE_TLS to True
MAIL_USERNAME to your gmail address
MAIL_PASSWORD to your app password


----- Original message -----
From: <midrangel@xxxxxxxxxxxxxxxxx>
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxxxxxxxx>
To: "'IBMi Open Source Roundtable'"
<opensource@xxxxxxxxxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] [IBMiOSS] Send mail via a google account from
python
Date: Mon, May 18, 2020 4:18 PM

So, what is the magic elixir needed to get a valid google account
to
accept
an email from Python (with flask-mail) and send it out?



Lots of 2 year old discussions on the internet, but I've not seen
anything
recent enough (over two years old) to pay attention to.



--

Jim Oberholtzer

Agile Technology Architects



--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
[2][2]https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [3][3]https://archive.midrange.com/opensource .

Help support midrange.com by shopping at amazon.com with our
affiliate
link: [4][4]https://amazon.midrange.com




References

Visible links
1.
[5]https://stackabuse.com/how-to-send-emails-with-gmail-using-python/
2. [6]https://lists.midrange.com/mailman/listinfo/opensource
3. [7]https://archive.midrange.com/opensource
4. [8]https://amazon.midrange.com/
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [9]https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [10]https://archive.midrange.com/opensource .

Help support midrange.com by shopping at amazon.com with our affiliate
link: [11]https://amazon.midrange.com
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [12]https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [13]https://archive.midrange.com/opensource .

Help support midrange.com by shopping at amazon.com with our affiliate
link: [14]https://amazon.midrange.com




References

Visible links
1. https://stackabuse.com/how-to-send-emails-with-gmail-using-python/
2. https://lists.midrange.com/mailman/listinfo/opensource
3. https://archive.midrange.com/opensource
4. https://amazon.midrange.com/
5. https://stackabuse.com/how-to-send-emails-with-gmail-using-python/
6. https://lists.midrange.com/mailman/listinfo/opensource
7. https://archive.midrange.com/opensource
8. https://amazon.midrange.com/
9. https://lists.midrange.com/mailman/listinfo/opensource
10. https://archive.midrange.com/opensource
11. https://amazon.midrange.com/
12. https://lists.midrange.com/mailman/listinfo/opensource
13. https://archive.midrange.com/opensource
14. https://amazon.midrange.com/
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/opensource.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.