login about faq

Hi!

I have a small issue where I need to remove the body in the email. Marked with bold is this even possible?

By dumping the .eml file to disk this is what I get;

    MIME-Version: 1.0
Date: Thu, 03 Aug 2017 17:32:44 +0200
Message-ID: <d05be05282ab47eb10e490abd6fe94501a050ee3@item-s36546>
X-Priority: 3 (Normal)
CKX-Bounce-Address: From@Address.com
From: From@Address.com
Subject: This is subject
Content-Type: multipart/mixed;
     boundary="------------090606030907080305090305"

**--------------090606030907080305090305
Content-Type: text/plain
Content-Transfer-Encoding: 7bit**

--------------090606030907080305090305
Content-Type: application/octet-stream;
     name="MyFile.myFileExtension"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="MyFile.myFileExtension"

FBUWFxg=

--------------090606030907080305090305--

As you can see I have an attachment, which basically is a few bytes, just for test purposes. The system I'm sending the mail to does not expect a body in the mail and therefore that system will fail(I have no control over this system). Is it somehow possible to remove the header of the body? so the result would be

    MIME-Version: 1.0
    Date: Thu, 03 Aug 2017 17:32:44 +0200
    Message-ID: <d05be05282ab47eb10e490abd6fe94501a050ee3@item-s36546>
    X-Priority: 3 (Normal)
    CKX-Bounce-Address: From@Address.com
    From: From@Address.com
    Subject: This is subject
    Content-Type: multipart/mixed;
         boundary="------------090606030907080305090305"

--------------090606030907080305090305
    Content-Type: application/octet-stream;
         name="MyFile.myFileExtension"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename="MyFile.myFileExtension"

FBUWFxg=

--------------090606030907080305090305--

asked Aug 03 at 11:43

trebias's gravatar image

trebias
1

edited Aug 04 at 08:51

jpbro's gravatar image

jpbro ♦
1.1k2618


Perhaps try the RemovePlainTextAlternative or RemoveAttachedMessage methods? I haven't tested them myself, but they look promising.

link

answered Aug 04 at 08:53

jpbro's gravatar image

jpbro ♦
1.1k2618

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×195
×35
×13

Asked: Aug 03 at 11:43

Seen: 83 times

Last updated: Aug 04 at 08:53

powered by OSQA