Automatically save sent Emails Outlook

Add-in Express™ Support Service
That's what is more important than anything else

Automatically save sent Emails Outlook
 
Subscribe
wmgroup




Posts: 26
Joined: 2010-04-23
I currently have a form that pops up on new emails where employees can fill out information for filing purposes and save them before they are sent. This causes problem because when we view them they of course show as unsent messages. What I'd like for it to do is if they fill out form completely then it will automatically save a copy of the sent item when they press send. How can i do this. I'm a hack of a programmer so example would be nice. Thanks
Posted 22 Mar, 2019 13:48:42 Top
Andrei Smolin


Add-in Express team


Posts: 16178
Joined: 2006-05-11
Hello,

So you handle emails when they are sent or when they are received? Where do you store the information that the user provides: on the email item itself or in an external store (such as a DB)?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 25 Mar, 2019 02:46:22 Top
wmgroup




Posts: 26
Joined: 2010-04-23
The user can save any email they would like by just selecting it and clicking save button, which brings up the form. The to, from, subject, along with project information we require are stored in database for searching and the email is saved on network as .msg. My problem is I have the form on newly created emails also because they don't want to go to the sent items after they send it to file it so I have to do it beforehand but then the emails don't appear to be sent as expected when viewing them from the saved msg file. Problem would be solved if people had a few seconds to go to sent folder and file accordingly. Since they are too lazy I have to require them to fill out the form upon creation and click save before sending the email. I just don't know how to get the sent message after it is sent. What I am trying to do is remove the save button on the new email form and if they fill out the form fields then it automatically save the email accordingly from the sent folder. Thanks
Posted 25 Mar, 2019 07:16:43 Top
Andrei Smolin


Add-in Express team


Posts: 16178
Joined: 2006-05-11
wmgroup writes:
Problem would be solved if people had a few seconds to go to sent folder and file accordingly. Since they are too lazy


Consider adding some ID to internet headers of the email to be sent. Then you handle the ItemAdd event of the Items collection of the Sent Items folder: if the email contains the ID, you show the form and ask the user to fill it.

On how to add custom info to the Internet headers, see https://www.add-in-express.com/forum/read.php?FID=5&TID=14156.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 25 Mar, 2019 08:38:40 Top
wmgroup




Posts: 26
Joined: 2010-04-23
Thanks for reply that should give me a starting point. Since they are presented the form on new emails is there a way to get the id of the current email being composed or is that only created after it has hit server? This is the form the users sees when they open a new email to compose. Since filing is optional I was just thinking if they fill out the form then that means it has to be saved. Should I still need to append an ID to find it in the sent folder?

Do you have example on how to parse items collection of the sent folder?

[img]http://img18115.imagevenue.com/img.php?image=27916_form_122_920lo.JPG[/img]
Posted 25 Mar, 2019 10:29:44 Top
Andrei Smolin


Add-in Express team


Posts: 16178
Joined: 2006-05-11
Hello,

I'm not sure that I understand you.

The MailItem.EntryId property gets a non-empty value when you save the email. That property gets changed when you move an email to another folder. This is why you need to specify some other ID.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Mar, 2019 00:03:19 Top