Jump to content

Recommended Posts

Hi everybody,

I'm trying to get an email body with outlookex.au3:

_OL_ItemFind($oOL, $mailboxName, $olMail, "", "", "", "Body")

It is working great, but as I use the result in a notepad, all the pictures are replaced by links.

How can I get the body without any picture? The email is in HTML format.

I tried to find a way to convert the email in Text format before getting the body but I couldn't.

Is there another way to do it?

Thanks a lot for any help!

Totochu

Link to post
Share on other sites
Posted (edited)

Welcome to Autoit and the forum!

You could use a Regular Expression to remove the Links. Please have a look at StringRegExpReplace.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Link to post
Share on other sites

Hi Water, thanks for your reply and your welcome!

I've checked StringRegExpReplace which is a great function.

But here the problem: if I have "normal" links in my email? How can I know which link is part of the body and which one is from a picture? They look the same.

The bad thing is when you have a signature with loads of picture, you will get loads of long links instead.

So maybe just a function to get the body without signature?

Thanks!

Totochu

 

Link to post
Share on other sites
10 hours ago, Totochu said:

So maybe just a function to get the body without signature?

A signature is just a part of the body.
There is no way determine where the body text ends and the signature starts.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...