Search the Community
Showing results for tags 'subject'.
-
As for the object, in this case the StringReplace() function does not work for me. These are my steps: 1) Extract the subject from an EML file. (the first character is an emoji ) source from EML file: $sSubject = "?utf-8?B?8J+TiCA1IG9mIHRoZSBCZXN0IFN0b2NrcyB0byBCdXkgZm9yIERlY2VtYmVy?=" 2) in this case I perform a decoding with _QuotedPrintable_DecodeEncodedWord() output is: $sSubject = "?? 5 of the Best Stocks to Buy for December" 3) I perform StringReplace(): $sSubject = StringReplace($sSubject, "??", "") or $sSubject = StringReplace($sSubject, Chr(63)&Chr(63), "") But the characters ?? they are not replaced. Yet if I make an Asc of every character of the string with a for loop, are the first two characters really? that is 63 For cycle Local $aArray = StringSplit($sSubject, "", $STR_NOCOUNT) For $i = 0 To UBound($aArray)-1 ConsoleWrite($aArray[$i] & " - " & Asc($aArray[$i])& @CR) Next Output: ? - 63 ? - 63 - 32 5 - 53 - 32 o - 111 f - 102 - 32 t - 116 h - 104 e - 101 - 32 Does anyone have an explanation of why it doesn't work? Thank you all
- 7 replies
-
- stringreplace
- eml
-
(and 1 more)
Tagged with:
-
Good morning everyone, I thought I had already solved this issue but it turns out I did not. My code finds unread emails with this specific subject line of "request" but when I change the subject to SKIPPED + "request" = ("SKIPPED request") the program still finds the email and tries to process it. I only want to process emails with the exact match subject of "request". Here is my code that "finds" the unread emails with the subject of "request" or so I thought. Func ListUnreadEmails() ;******************************************************************************* ; Lists all unread E-mails from the folder Outlook-UDF-Test ;******************************************************************************* ; Stores all the unRead emails into an array Global $aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, _ "[UnRead]=True", "Subject", "request", "EntryID,Subject", "", 1) ; Displays the array of unRead emails If IsArray($aItems) Then ;_ArrayDisplay($aItems, "OutlookEX UDF: _OL_ItemFind - Unread mails") Else MsgBox(48, "OutlookEX UDF: _OL_ItemFind Example Script", _ "Could not find an unread mail. @error = " & @error & ", @extended: " & @extended) EndIf ; Gets the number of unread emails Global $numberOfUnRead = UBound($aItems, $UBOUND_ROWS) - 1 ;MsgBox("", "Number of Unread emails", $numberOfUnRead) EndFunc It acts as if any part of the subject containing the word "request" and the email is unread that it will try to process it. (I think)