python 2.7 gmail API help w/ passing variable to next func

I'm using a while True loop with a gmail API code I found online to extract some data if it's found inside of an email.

It all works for the most part though i've run into an issue. The gmail section will always look for a new email with this code - which I want!

The issue is, I have function that requires a stored variable from the while true loop named 'email' below will be a rough example:

print (temp_dict)

[login to view URL](temp_dict)

a = temp_dict['Snippet']

b = temp_dict['Sender']

c = temp_dict['Subject']

idk = 'test'

if c in idk:

z = [login to view URL](':')

complete_string = z[1] + ':' + z[0]

test = z[0]

test1 = z[1]

x = [login to view URL]("<")

y = [login to view URL](">")

email = (b[x:y]).strip('<')

print email



print'No new messages!'

def sendinfo():

me = "xxxxxxxxxxxxx@[login to view URL]"

my_password = r"xxxxxxxxxxxxx"

you = email < ----- This section here needs to be passed down from the while True loop.

msg = MIMEMultipart('alternative')

msg['Subject'] = "xxxxxxxxxxx"

msg['From'] = me

msg['To'] = you

html = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"

part2 = MIMEText(html, 'html')

[login to view URL](part2)

s = smtplib.SMTP_SSL('[login to view URL]')

[login to view URL](me, my_password)

[login to view URL](me, you, msg.as_string())

[login to view URL]()


Taidot: Python, tietojärjestelmäarkkitehtuuri

Näytä lisää: gmail api mysql, paypal mass pay api help, google road distance calculator api help, gmail api spam, gmail api get message body, python gmail api example, how to use gmail api, gmail api quickstart, gmail api send email javascript, gmail api python read email, gmail api send email, freelance adwords api help, acad api help, gmail creator help, daddy reseller api help, using gmail api application asp net, cyberhomes api help, gmail api 2009, gmail api social network, net gmail api 2009

Tietoa työnantajasta:
( 0 arvostelua ) Batumi, Georgia

Projektin tunnus: #18082084

9 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


Hi Nice to meet you. I'm python expert and my last project on is also python scraping task. My past works: Youtube comment scrapping Realestate property list to csv Jobsite content to csv And scra Lisää

$150 AUD 3 päivässä
(29 arvostelua)

Sir/Madam, I am an experienced Python developer with familiarity with OOPS concept and core Python. I have worked on projects involving complex data structures. I can write highly optimized code for you. Looking forwar Lisää

$150 AUD 1 päivässä
(40 arvostelua)

hi there I have 10 years experience in Python and web development. I did lots of projects in web world, develop in most web technologies. 8 years developing Django sites and services. I did lots of projects in scra Lisää

$155 AUD 3 päivässä
(32 arvostelua)

Hello! I am a python developer. I looked at your project and it seems interesting. I have all necessary skills required for this project. Ping me to discuss in detail.

$140 AUD 2 päivässä
(25 arvostelua)

Easy!!, gimme this job and I'll complete it in less than a day Relevant Skills and Experience python smtplib

$150 AUD 1 päivässä
(1 arvostelu)

hello, how do you do. i noticed your project. i have a good experience for you. please check out me. thank you. kind regards.

$222 AUD 3 päivässä
(0 arvostelua)

"Hi, Hope you are doing well! Thanks for sharing your project requirement with us. It will be our great pleasure to work on your project. I have checked your requirement, yes we can do it, because we already work on si Lisää

$208 AUD 7 päivässä
(0 arvostelua)

If you send me the script, I could edit it to work for what you're trying to do and explain what I added.

$30 AUD 1 päivässä
(0 arvostelua)

contact me its really easy I can do it for free!

$30 AUD 1 päivässä
(0 arvostelua)