185
Views
7
Comments
How to save email as text in entity with subject, To CC and BCC ?
Application Type
Reactive

Hi All,

I'm creating a portal in which one functionality is to send emails when office shift ends, with expressions in it, no attachment. How can I save the content as text (if possible with styling as there would be paragraphs and bold texts) in an entity so that I can use them further in screens (similar to Outlook with options as Inbox and Sent) for other users who receives the emails ?

Email :

UI to send email (only inputs as of now) : 
The "To" is defined as default value since it won't change. "From" is logged in user's email address.


Thanks,

Aman

2024-04-08 10-59-50
Pedro Sismeiro

Hi Aman!

You could create an Entity "Email_Log" with those attributes as you said (plus datetime I'd say, plus references if you need them), give them a fair margin in terms of text length and use HTML to save the styles (like <b> </b> for bold). Once your email sending timer runs, you can instantiate the Email_Log CRUD action and be able to retrieve it later on your pages, if you reference the To Bcc CC email addresses and/or identifiers.

Best regards,

Pedro Sismeiro

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

This is bad advise, OutSystems already logs this stuff. No need to reinvent the wheel here.

2024-09-12 02-43-38
Deepsagar Dubey

Hi Aman,

The easiest way is to create an entity with the required attributes and for the body of email you can use CK Editor CKEditor it'll help you to format your email as you required Bold or Italic content.

I hope it'll help you.

Thanks 

Deep

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

This is bad advise, OutSystems already logs this stuff. No need to reinvent the wheel here.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Aman,

Platform e-mail is already logged (if you set the "Log Content" property of the Send Email action to "Yes"), in the System entities Sent_Email (meta data like To, CC etc.) and Email_Content (the actual content). You'll need some trickery to get the plain text out of the Email_Content, as it's multi-part MIME encoded, but there's enough findable on-line to guide you with this.

2024-04-15 16-08-47
Aman Devrath

Thank you,

I haven't tried this yet, and will take some days for me to try, but I'll mark this as solution.

2024-04-15 16-08-47
Aman Devrath

I don't see the option to mark the solution, but if someone sees this comment, follow Killian's suggestion.

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.