Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Problem with sending text file as an attachment using this Gmail OAuth script
Post: RE: Problem with sending text file as an attachmen...

(Feb-07-2018, 07:00 PM)lghauth Wrote: You will need to do something like this, to read line by line: if main_type == 'text': print("text") output_file = "" with open(attached_file, 'r') as fp: # 'r...
downloaderfan General Coding Help 6 6,993 Feb-07-2018, 09:54 PM
    Thread: Problem with sending text file as an attachment using this Gmail OAuth script
Post: RE: Problem with sending text file as an attachmen...

Quote:To fix you have 2 options, you can try to read line by line (by using readline) and add "\r\n" in the end of each line. Or you can try to open the Text File in binary mode: Python Code: (Double...
downloaderfan General Coding Help 6 6,993 Feb-07-2018, 04:33 PM
    Thread: Problem with sending text file as an attachment using this Gmail OAuth script
Post: RE: Problem with sending text file as an attachmen...

(Feb-06-2018, 10:59 AM)lghauth Wrote: It might be because your are encoding (base64) the attachment in the line 203. encoders.encode_base64(attachement) #https://docs.python.org/3/library/email-ex...
downloaderfan General Coding Help 6 6,993 Feb-06-2018, 05:42 PM
    Thread: Problem with sending text file as an attachment using this Gmail OAuth script
Post: Problem with sending text file as an attachment us...

I'm using a script that sends an email via Gmail using OAuth, which I got from here. I tested the script twice with with 2 different attachments, one was a bmp file & the other was a txt file. The...
downloaderfan General Coding Help 6 6,993 Feb-05-2018, 05:51 PM

User Panel Messages

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