How to convert a string to a mail message

I am trying to get the mail to be sent as a draft. For that i am planning to use the activity of “Move Imap messages to a folder”. But the problem is , i only have the reply body as a string and Move activity requires mail message as a input.

Do let me know some way to achieve this.

1 Like

You can’t use Move IMAP for this because it wants the ID of the mail message to move it from one existing folder to another existing folder. You won’t have a “from folder” to give it. Which email system are you using?

You could mark the ‘Send As Draft’ option so it would generate the email in draft directly.

Hi

Hope this would help in your scenario
https://docs.uipath.com/activities/other/latest/productivity/create-and-save-an-email-locally

Cheers @P-A-J

I am not going for outlook activities , just IMAP and SMTP activities

Will the code give output as mail message ?!

Which activity ? i didnt find such option

Yes u will be receiving a mail message as output object from that code snippet
It also has code lines to add attachments
U can have if u want or neglect that

Cheers @P-A-J

IMAP to connect to what? You realize that IMAP is for getting emails, not sending them, right? You can’t use IMAP to create a draft. You also can’t use SMTP to create a draft, as SMTP is not aware of folders or anything else it just connects to a mail server to send an email.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.