Sign in to follow this  
Followers 0
peanutym

Taking data from an email then recreate a new email

6 posts in this topic

#1 ·  Posted (edited)

So i have a server that sends me log files via email everyday, i dont own the server so i am not able to edit the log that it sends. So what i would like to do is take the email that it sends take some of that data and recreate another email to send back out.

The email log that it sends is in the exact same format each time, so i am hoping that i can extract the info being numbers/letters and recreate fairly easy.

My question is this possible? If so can you point me in the right direction in terms of functions i need to be looking for to exact this information?

Also willing to pay for this software to be wrote if someone is interested in discussing pricing let me know.

Thanks in advance.

Edited by peanutym

Share this post


Link to post
Share on other sites



What software do you use to receive the email? There are options depending on how you get/receive you email.

If you want someone to build an app for you, go to www.rentacoder.com.

Share this post


Link to post
Share on other sites

i use outlook 2007 for my email. My provider has a web option also if that would be easier.

Share this post


Link to post
Share on other sites

Here's a link to a pretty good Outlook UDF: http://www.autoitscript.com/forum/index.php?showtopic=89321&hl=outlook&st=0

I'm not sure if there are any functions in there that will help you save the attachment, but if you search this forum for "outlook com" you'll get several results including the link above as well as several links which pertain to saving attachments from emails.

New Outlook security prevents you from automatically sending emails using a script. People get around it by kicking off a second script right before sending the message, the second script will wait for the message that prompts you "another program is trying to send mail on your behalf..." and presses OK for you. I think something like this is actually included with the Outlook UDF. Certain other security features may not allow you to do something things via COM so you'll have to end up using a combination of both COM and AutoIt.

I only have Outlook 2003 so I can't test with 2007. Once I have more time I can send you sample script to describe in detail how to do the steps above. There shouldn't be too much of a difference between the two versions, nothing a little code tweaking can't fix anyway.

You may also want to have this reference handy: http://msdn.microsoft.com/en-us/library/bb177050(v=office.12).aspx

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

The UDF appears to have everything you'll need for your project. I just tested the function in there for saving an email and its attachments, worked fine for me. I was then able to find the saved attachment, process it, then send out another email with a new attachment.

_OutlookSaveMail() is the function I used to find the email and save it's attachments.

_OutlookSendMail() is the function to create the email to be sent back out

Both of the above mentioned functions cause Outlook's Security Warnings to pop up so you'll also need to use the included OutlookWarning1.au3 and OutlookWarning2.au3 to automatically bypass/acknowledge the prompts for you.

Get something going and post whatever you might need some help with...

Edited by MrMitchell

Share this post


Link to post
Share on other sites

Thanks for this, i had been out of town and wasnt able to respond. ill check this out and see what i can find out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0