Python Forum
Python Automated Email
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Automated Email
#6
(Jul-12-2020, 02:41 PM)aidanh26 Wrote: I appreciate you taking the time to have a look so thank you!!

Just as an fyi.....before I added in the section below, it would successfuly email a given address. The section below seems to have an adverse affect however I do require the email address to be sourced from an excel file.

loc = ("NumberPlateList.xlsx")
 

wb = xlrd.open_workbook(loc)

sheet = wb.sheet_by_index(0)

sheet.cell_value(0, 0)
 
scannedNumberPlateNumber = ('202-G-5679')


for i in range(sheet.nrows):

    if sheet.cell_value(i, 0) == scannedNumberPlateNumber:

       print('Found in column A - ignore')

    if sheet.cell_value(i, 2) == scannedNumberPlateNumber:

       print('Found in column C - send email to ' + sheet.cell_value(i, 3) )

Hmm that is interesting. Can you send me the entire code similar to the first submission (obvs. not including credentials) but including calls to functions etc?

I'll see if i can debug,

Harley
Reply


Messages In This Thread
Python Automated Email - by aidanh26 - Jul-12-2020, 12:25 PM
RE: Python Automated Email - by HarleyQuin - Jul-12-2020, 01:17 PM
RE: Python Automated Email - by aidanh26 - Jul-12-2020, 01:21 PM
RE: Python Automated Email - by HarleyQuin - Jul-12-2020, 02:03 PM
RE: Python Automated Email - by aidanh26 - Jul-12-2020, 02:41 PM
RE: Python Automated Email - by HarleyQuin - Jul-12-2020, 03:48 PM
RE: Python Automated Email - by aidanh26 - Jul-12-2020, 04:14 PM
RE: Python Automated Email - by HarleyQuin - Jul-12-2020, 04:44 PM
RE: Python Automated Email - by aidanh26 - Jul-13-2020, 07:37 AM
RE: Python Automated Email - by HarleyQuin - Jul-13-2020, 09:00 AM
RE: Python Automated Email - by aidanh26 - Jul-13-2020, 04:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help send email by Python using smtplib hangme 6 6,407 Jan-25-2020, 03:31 AM
Last Post: shapeg
  sending email with python shahpy 4 14,392 Oct-03-2016, 10:00 PM
Last Post: shahpy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020