How to create an email based on existing email?


I would like to create an email based on existing records in Sent_Email and Email_Content entities. I am able to use CreateSent_Email and Create Email_Content actions with partially filled data from existing record but I can't set messageId or Activity_Id.

The other option would be to modify Email_Status record for the email but it's not possible due to the fact that this entity is read-only. Do you know any solution how to update Email_Status record?

Thanks in advance for your responses.



Hello Michal.

I've never seen such a use case. Could you explain?

Hi Pedro,

The issue is that when sending large amount of emails we got errors from the email server which blocks the email sending process. The error reason is something that we can't overcome so we have to implement some workaround. My idea to it is to design a timer that will take all emails with error status, copy them to some temporary table, remove the original ones so that the process is unblocked. Then based on the emails from temporary table I want to copy them to the main tables so that to try to send them again.

Any idea how to solve the issue would be appreciated.

I would go and investigate why the emails are being blocked. Seems that you're implementing a workaround for something that should be solved beforehand.

Hi Pedro,

The reason why the emails are being blocked is known and this is not related to Outsystems platform, I mean the blocking factor itself. Outsystems could implement more configuration parametres that could prevent the blocking from happening but that's another story.

Given that I am looking for a solution that will allow me to copy existing email to temporaty table and base on this record to be able to create a new email. Any ideas how to achieve this?

Fair enough. I would like to get your thoughts on what we could change in OutSystems so that the emails are not blocked. In terms of changing the records in the OS database, I don't see how...

The reason of errors and the blocking is too many login attempts to email server (out case is gogle smtp relay). Please have a look at the ticket:

If we could control the email scheduler service by more parameters - apart from the only one which says how many email threads are in use - that would solve the problem. The parameter saying how often scheduler service is checking for new emails to send would be a very nice option - right now it's 5 seconds.