Community Discussions and Support
Extract message Content-Transfer-Encoding: base64

Brilliant, all working as I wanted.

 

Thank you so much to all contributors 

<p><span style="font-size: 10pt;">Brilliant, all working as I wanted.</span></p><p> </p><p><span style="font-size: 10pt;">Thank you so much to all contributors </span></p>

I have a rule to extract the content of a message for further processing by auto-it. That message is Content-Transfer-Encoding: base64
and shows perfectly fine in Pmail but the content of the extracted file is not decoded.

The idea was to avoid to manually copy and past into a file.

 Is is possible to save the message after decoding?

 Thanks 

<p>I have a rule to extract the content of a message for further processing by auto-it. That message is <span style="font-size: 13.3333px;">Content-Transfer-Encoding: base64</span> and shows perfectly fine in Pmail but the content of the extracted file is not decoded.</p><p><span style="font-size: 10pt;">The idea was to avoid to manually copy and past into a file.</span></p><p> Is is possible to save the message<span style="font-size: 10pt;"> after decoding?</span></p><p> <span style="font-size: 10pt;">Thanks </span></p>

Hi,

Look in your Pegasus Mail Help index after "Saving messages as text files (2)". It might be what you're looking for.

I've being able to save messages, both plain-text and HTML, as well as extract attachments (PDF, ODF, XLSX, etc) using rule actions.

<p>Hi,</p><p>Look in your Pegasus Mail Help index after "Saving messages as text files (2)". It might be what you're looking for.</p><p>I've being able to save messages, both plain-text and HTML, as well as extract attachments (PDF, ODF, XLSX, etc) using rule actions. </p>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

With the message just opened, go to Windows Explorer and navigate to your TEMP directory. Scroll down to the last entries. You should find a file that is of the form WPM*.PM$  which is timestamped when you opened the message.  You will find that the message file contains the Html version of the message, decoded. You can then save that file somewhere, and finally close the message in Pegasus Mail.

What you have got is the BASE64 decoded version of your message.  Open it in a browser, and the content will be formatted and contain any remote images

<p>With the message just opened, go to Windows Explorer and navigate to your TEMP directory. Scroll down to the last entries. You should find a file that is of the form WPM*.PM$  which is timestamped when you opened the message.  You will find that the message file contains the Html version of the message, decoded. You can then save that file somewhere, and finally close the message in Pegasus Mail.</p><p>What you have got is the BASE64 decoded version of your message.  Open it in a browser, and the content will be formatted and contain any remote images</p>

Thank you for your suggestions but I as I mentioned I am looking for an automated solution. 

Currently I have a "New mail filtering rule" to "extract" to a file which saves the raw encoded message. I would like a rule that saves the decoded message.

It looks like this is not possible, pity.

Every week I receive a new set of data and I need to be sure the files is always the latest set. A manual save or copy & paste could be forgotten and the file out of date.

As an aside, "extract" should be renamed "raw save"

<p>Thank you for your suggestions but I as I mentioned I am looking for an automated solution. </p><p>Currently I have a "New mail filtering rule" to "extract" to a file which saves the raw encoded message. I would like a rule that saves the decoded message.</p><p><span style="font-size: 10pt;">It looks like this is not possible, pity.</span></p><p>Every week I receive a new set of data and I need to be sure the files is always the latest set. A manual save or copy & paste<span style="font-size: 10pt;"> could </span><span style="font-size: 10pt;">be </span><span style="font-size: 13.3333px;">forgotten</span><span style="font-size: 10pt;"> and the file out of date.</span></p><p>As an aside, "extract" should be renamed "raw save"</p>

Thank you for your suggestion, please see my reply to Euler.

Thank you for your suggestion, please see my reply to Euler.

[quote user="Pierre"]

Thank you for your suggestions but I as I mentioned I am looking for an automated solution. 

Currently I have a "New mail filtering rule" to "extract" to a file which saves the raw encoded message. I would like a rule that saves the decoded message.

It looks like this is not possible, pity.

Every week I receive a new set of data and I need to be sure the files is always the latest set. A manual save or copy & paste could be forgotten and the file out of date.

As an aside, "extract" should be renamed "raw save"

[/quote]

I got your point. The "Extract" rule action was meant to plain-text messages only. Strangely Pegasus Mail does have a routine to save encoded content and maybe David H. could make it available as a rule action too. For example, if you mouse right-click your target message and pick "Save message data to file (Ctrl+S)" from the menu, it will save the decode body to the chosen file.

As mentioned behind, Pegasus Mail can save encoded attachments as decoded files. It would be a matter to extend this capability to the message body, I think.

[quote user="Pierre"]<p>Thank you for your suggestions but I as I mentioned I am looking for an automated solution. </p><p>Currently I have a "New mail filtering rule" to "extract" to a file which saves the raw encoded message. I would like a rule that saves the decoded message.</p><p><span style="font-size: 10pt;">It looks like this is not possible, pity.</span></p><p>Every week I receive a new set of data and I need to be sure the files is always the latest set. A manual save or copy & paste<span style="font-size: 10pt;"> could </span><span style="font-size: 10pt;">be </span><span style="font-size: 13.3333px;">forgotten</span><span style="font-size: 10pt;"> and the file out of date.</span></p><p>As an aside, "extract" should be renamed "raw save"</p><p>[/quote]</p><p>I got your point. The "Extract" rule action was meant to plain-text messages only. Strangely Pegasus Mail does have a routine to save encoded content and maybe David H. could make it available as a rule action too. For example, if you mouse right-click your target message and pick "Save message data to file (Ctrl+S)" from the menu, it will save the decode body to the chosen file.</p><p>As mentioned behind, Pegasus Mail can save encoded attachments as decoded files. It would be a matter to extend this capability to the message body, I think. </p>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6


You can use my base64decode utility which is in http://community.pmail.com/files/folders/utils/entry51898.aspx.  You would use any base64 encoded file, and the result would be same filename with file extension set to txt.  So in Pegasus Mail your rule would extract and then run base64decode on whatever file has been saved.

Martin


<p> </p><p>You can use my base64decode utility which is in http://community.pmail.com/files/folders/utils/entry51898.aspx.  You would use any base64 encoded file, and the result would be same filename with file extension set to txt.  So in Pegasus Mail your rule would extract and then run base64decode on whatever file has been saved.</p><p>Martin</p><p> </p>

[quote user="irelam"]


You can use my base64decode utility which is in http://community.pmail.com/files/folders/utils/entry51898.aspx.  You would use any base64 encoded file, and the result would be same filename with file extension set to txt.  So in Pegasus Mail your rule would extract and then run base64decode on whatever file has been saved.

Martin


[/quote]

Martin, if it is used within "Run a program" action I think Pegasus Mail passes message content to it automatically. Am I right?

[quote user="irelam"]<p> </p><p>You can use my base64decode utility which is in http://community.pmail.com/files/folders/utils/entry51898.aspx.  You would use any base64 encoded file, and the result would be same filename with file extension set to txt.  So in Pegasus Mail your rule would extract and then run base64decode on whatever file has been saved.</p><p>Martin</p><p> </p><p>[/quote]</p><p>Martin, if it is used within "Run a program" action I think Pegasus Mail passes message content to it automatically. Am I right? </p>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

Martin, did a test with an encoded body of the email and it's fooled by the headers (I think). OTOH if you extract ONLY the encoded body into a file it decodes fine to file.txt.

Anyway, I think a workaround  to this "problem" would be using the rule action "Print" and print the message to a PDF printer set as the Pegasus Mail default printer.

<p>Martin, did a test with an encoded body of the email and it's fooled by the headers (I think). OTOH if you extract ONLY the encoded body into a file it decodes fine to file.txt.</p><p>Anyway, I think a workaround  to this "problem" would be using the rule action "Print" and print the message to a PDF printer set as the Pegasus Mail default printer. </p>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

[quote user="Euler GERMAN"]Anyway, I think a workaround  to this "problem" would be using the rule action "Print" and print the message to a PDF printer set as the Pegasus Mail default printer.
[/quote]

No joy.[:(] The Print rule action is plain-text only. It doesn't render the HTML code, just print it. Maybe using a macro runner like TinyTask could do if we had an action to "Open" the message.

The OP said he uses an AutoIt script already, so I think he could add some lines to his code to locate the encoded text and decode it. There are some UDF's at AutoIt forum do decode Base64. Just my tuppence.

<p>[quote user="Euler GERMAN"]Anyway, I think a workaround  to this "problem" would be using the rule action "Print" and print the message to a PDF printer set as the Pegasus Mail default printer. [/quote]</p><p>No joy.[:(] The Print rule action is plain-text only. It doesn't render the HTML code, just print it. Maybe using a macro runner like TinyTask could do if we had an action to "Open" the message.</p><p>The OP said he uses an AutoIt script already, so I think he could add some lines to his code to locate the encoded text and decode it. There are some UDF's at AutoIt forum do decode Base64. Just my tuppence. </p>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

Ah I think I can made this work with auto-it help, thank you.

I'll experiment with "Run a program" 

Incidentally, how do I make base64code Form1 close on its own?

I was going to post a screen shot but cant see how to do it on this BB

<p>Ah I think I can made this work with auto-it help, thank you.</p><p>I'll experiment with "Run a program" </p><p>Incidentally, how do I make base64code Form1 close on its own?</p><p>I was going to post a screen shot but cant see how to do it on this BB</p>

I will update it to auto-close, today

Martin 

<p>I will update it to auto-close, today</p><p>Martin </p>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft