Python Forum
How to Save Full Email Body to CLOB in Oracle w/Carriage Returns?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Save Full Email Body to CLOB in Oracle w/Carriage Returns?
#1
I've been working on code that successfully saves an entire email body content to a CLOB field in Oracle.

For the life of me, I cannot get the carriage returns that are present in the Oracle email to come across / save into the CLOB field in the Oracle database. All of the carriage returns and/or line breaks in the email that of course make it very easily-readable don't end up carrying over into the Oracle field and the resulting content of that field is all strung together and very difficult to quickly glance at/read.

I've attached a sample of the code as a text file. The code in this block basically cycles through the email body line by line and builds a new string. I've tried adjusting the code in the attached text file to include chr(10) and/or chr(13) for line breaks / carriage returns, but the resulting data that's inserted into Oracle later on in some additional code still is all run together with the line breaks / carriage returns not present.

Thanks in advance for any ideas here!

Attached Files

.txt   PartialCode.txt (Size: 294 bytes / Downloads: 407)
Reply
#2
This?
https://www.thatjeffsmith.com/archive/20...veloper-4/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to save to multiple locations during save cubangt 1 543 Oct-23-2023, 10:16 PM
Last Post: deanhystad
  Save image from outlook email cubangt 1 694 Jun-07-2023, 06:52 PM
Last Post: cubangt
  Full Body Tracking and Recognition with OpenCV principemestizo 0 1,426 Oct-18-2021, 04:47 PM
Last Post: principemestizo
  Getting Shell to take prompt string plus int value and carriage return bayouprophet 1 1,748 Aug-29-2020, 05:13 PM
Last Post: bowlofred
  [split] script: remove all "carriage return" from my json variable pete 2 2,790 May-05-2020, 03:22 PM
Last Post: deanhystad
  Zeep lib, encrypt soap body miha1234 0 2,841 Sep-12-2019, 07:52 AM
Last Post: miha1234
  script: remove all "carriage return" from my json variable mfran2002 4 11,182 Feb-20-2019, 05:07 AM
Last Post: mfran2002
  Add png to the body of the email, not the attachment Ivan87 8 5,943 Dec-14-2018, 11:05 AM
Last Post: wavic
  get email text body: very close but I can't get it [SOLVED} Pedroski55 5 12,705 Oct-07-2018, 11:38 AM
Last Post: j.crater
  Python win32com add image in HTML body of email Joe_Dananza 0 14,481 Sep-09-2018, 02:48 PM
Last Post: Joe_Dananza

Forum Jump:

User Panel Messages

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