Menu

#51 Blat change Content-Type and charset

v1.0 (example)
open
nobody
None
1
2018-05-31
2018-05-02
Heiko Mück
No

Hi chip,

first of all many thanks for the adjustments that you made for us in blat by now. This is all perfect.

But now I have further problems with a certification because we have to deal with very special demands.

Please look at the following code down here, that is the way it should be:

Content-Type: multipart/mixed;
boundary="------------080807020509080601050908"
This is a multi-part message in MIME format.
--------------080807020509080601050908
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Body der 1-Click-Lieferung
--------------080807020509080601050908
Content-Type: application/xml; name="begleitdatei.xml"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="begleitdatei.xml"
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4
...
--------------080807020509080601050908
Content-Type: application/octet-stream; name="Z01123456699_31.05.2015_12.
00.con.xkm"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Z01123456699_31.05.2015_12.00.
con.xkm"
XJ6dG51bW1lci9CU05SOiAwMTAxMDAzMDAgICAgICAgICAgICAgIA0KRXJzdGVsbHVuZ3Nk
YXR1bTogMTguMDkuMjAxNSAxMTowNjowMSAgIA0KUGFrZXQgMS8xICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIA0KDQoqWEtNKg0KMS4yNiAgDQoxICAgIA0KMSAgICANCjcgDQox

My message with blat looks like this:

Content-Type: multipart/mixed;
boundary="------------080807020509080601050908"
This is a multi-part message in MIME format.
--------------080807020509080601050908
Content-Transfer-Encoding: 7BIT
Content-Type: text/plain;
charset="ISO-8859-1"

Body der 1-Click-Lieferung
--------------080807020509080601050908
Content-Type: text/xml; name="begleitdatei.xml"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="begleitdatei.xml"
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4
...
--------------080807020509080601050908
Content-Type: application/octet-stream; name="Z01123456699_31.05.2015_12.
00.con.xkm"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Z01123456699_31.05.2015_12.00.
con.xkm"
XJ6dG51bW1lci9CU05SOiAwMTAxMDAzMDAgICAgICAgICAgICAgIA0KRXJzdGVsbHVuZ3Nk
YXR1bTogMTguMDkuMjAxNSAxMTowNjowMSAgIA0KUGFrZXQgMS8xICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIA0KDQoqWEtNKg0KMS4yNiAgDQoxICAgIA0KMSAgICANCjcgDQox

That's the way I use blat for the message above:

"C:\QMED\Programme\blat\blat.exe" -q -to "abrechnung.zert@kv-safenet.de" -server localhost -port 25 -u q-med.1 -pw 06123456!Mia1975@ABC? -f "q-med.1@kv-safenet.de" -log C:\QMED\DATEN\1click\blat\1click_30042018_150344.log -s "1-Click Abrechnung" -attach "C:\QMED\Daten\Profiles\27\temp\begleitdatei.xml,C:\QMED\DATEN\Abrechner\16\KVDT\KVDT-2018.2\Z01241234601_12.04.2018_11.12.con.XKM" -body "1-Click-Abrechnung" -x "X-KVC-Dienstkennung: 1ClickAbrechnung;Lieferung;V2.0" -x "X-KVC-Sendersystem: Q-MED;279.363" -superdebugT

Is there any possibility to change the Content-Type, charset and Content-Transfer-Encoding at the moment for all boundaries?
With your last change we were able to change the Content-Discription.
If not, it would be very helpful for us when you were able to make another adjustment.

Many thanks and best regards

Related

Support Requests: #51

Discussion

  • Chip

    Chip - 2018-05-02

    Have you tried using these two options?

    1. -8bitmime
    2. -charset "utf-8"
     
  • Heiko Mück

    Heiko Mück - 2018-05-07

    No, it doesn't work. I have made three tests:
    1. both parameters
    2. only -8bitmime
    3. only -charset "UTF"

    The result you can see in the attachments.

    I added the new parameter at the end of the command line:

    "C:\QMED\Programme\blat\blat.exe" -q -to "abrechnung.zert@kv-safenet.de" -server localhost -port 25 -u q-med.1 -pw 06123456!Mia1975@ABC? -f "q-med.1@kv-safenet.de" -log C:\QMED\DATEN\1click\blat\test1.log -s "1-Click Abrechnung" -attach "C:\QMED\Daten\Profiles\27\temp\begleitdatei.xml,C:\QMED\DATEN\Abrechner\19\KVDT\KVDT-2018.2\Z01781234001_13.04.2018_10.40.con.XKM" -body "1-Click-Abrechnung" -x "X-KVC-Dienstkennung: 1ClickAbrechnung;Lieferung;V2.0" -x "X-KVC-Sendersystem: Q-MED;279.363" -superdebugT -charset "UTF-8" -8bitmime

    Have you another idea?

    And do you also have an idea for the problem with the change of the content-type to application/xm?

     

    Last edit: Chip 2018-05-08
  • Chip

    Chip - 2018-05-08

    If you attach log files, please edit the files to remove your passwords in the AUTH PLAIN line. I edited your attachments to change the AUTH PLAIN line.

    Blat looks for the server to say that it supports 8-bit MIME before Blat will allow UTF-8 to be sent. If the server does not say that it supports 8-bit MIME, then Blat will send UTF-7 instead, and the data will be converted to UTF-7 encoding. In your case, the server says:

    250-OK
    250 AUTH LOGIN PLAIN

    The server does not tell us that it does support 8-bit data. If the server does support 8-bit MIME, then there should have been a line from the server like this:

    250-8BITMIME

    The Content-Type being "text/xml" comes from your Windows registry for XML file types. This was originally written by Toby Korn in 1998, the original author of Blat. It is possible to get into your Windows registry using regedit.exe, go to "Computer", then to "HKEY_CLASSES_ROOT", then to ".xml", and edit the Content Type string from "text/xml" to "application/xml".

    Using the -contentType option only works when the Windows register does not have an entry for a given filename extension. Plus, the -contentType option would apply to all attachments for which there is no Windows registry entry for the attachments' filename extension. Since your command line has two attachments, the -contentType could potentially affect both attachments.

     
  • Heiko Mück

    Heiko Mück - 2018-05-15

    Hello Chip,

    thanks a lot for your support. The hint with the content type "application/xml" works perfect.

    I have the confirmation from the institution that the server doesn't give back, that he supports UTF-8, though he does.

    I get the answer, that we are forced to send UTF-8 or leave the complete body out of the message to get the certificate. With ISO-8859-1 or UTF-7 as charset we will not get the certificate.

    I have tried what happened when I not use the option -body to send without the body. As reaction blat does nothing and the cmd line window doesn't close.

    Here you can see my command line call:
    "C:\QMED\Programme\blat\blat.exe" -q -to "abrechnung.zert@kv-safenet.de" -server localhost -port 25 -u q-med.1 -pw xxxxxxxxxxxxx -f "q-med.1@kv-safenet.de" -log C:\QMED\DATEN\1click\blat\1click_15052018_152620.log -s "1-Click Abrechnung" -attach "C:\QMED\Daten\Profiles\27\temp\begleitdatei.xml,C:\QMED\DATEN\Abrechner\16\KVDT\KVDT-2018.2\Z01241234601_12.04.2018_11.12.con.XKM" -x "X-KVC-Dienstkennung: 1ClickAbrechnung;Lieferung;V2.0" -x "X-KVC-Sendersystem: Q-MED;279.363" -superdebugT

    By adding -body it works perfect, I only get the charset ISO-8859-1

    Do I make something wrong or is it not allowed to send without a body?

     
  • Chip

    Chip - 2018-05-16

    If you do not use -body, and you do not give Blat a file to use as the message body, then Blat will wait for keyboard input until a Ctrl-Z is pressed.

    I can add a new option, such as -force8bit, that will tell Blat to believe the server supports 8bitmime. If Blat knows, or believes, the server does support 8bitmime, then Blat can send UTF-8 instead of UTF-7. Do you want the 32-bit version or 64-bit version?

     
  • Heiko Mück

    Heiko Mück - 2018-05-17

    Hi Chip,

    an option like -force8bit would be very nice.

    We use both versions.

    In my test enviroment I use at the moment this version:

    Blat v3.2.19 (build : Sep 27 2017 23:18:34)
    32-bit Windows, Full, Unicode

     
  • Chip

    Chip - 2018-05-20

    Please try the attached 32-bit version with the -force8bit option, and use -charset "utf-8". Together, this should give you what you are looking for.

    Thanks,
    Chip

     
  • Heiko Mück

    Heiko Mück - 2018-05-22

    Hi Chip,

    thanks for your support.

    I can not start the attached blat.exe. I become the message, that blat is not 32 bit application.

    Is this the 64 bit version?

     
  • Heiko Mück

    Heiko Mück - 2018-05-22

    Sorry, everything is all right. I started the wrong blat.exe.

     
  • Heiko Mück

    Heiko Mück - 2018-05-22

    I made now the tests, but it doesn't work.

    I used these command:
    "C:\QMED\Programme\blat\blat.exe" -q -to "abrechnung.zert@kv-safenet.de" -server localhost -port 25 -u q-med.1 -pw XXXXXXXXXXX -f "q-med.1@kv-safenet.de" -log C:\QMED\DATEN\1click\blat\1click_22052018_102536.log -s "1-Click Abrechnung" -attach "C:\QMED\Daten\Profiles\27\temp\begleitdatei.xml,C:\QMED\DATEN\Abrechner\16\KVDT\KVDT-2018.2\Z01241234601_12.04.2018_11.12.con.XKM" -body "1-Click-Abrechnung" -x "X-KVC-Dienstkennung: 1ClickAbrechnung;Lieferung;V2.0" -x "X-KVC-Sendersystem: Q-MED;279.363" -superdebugT -charset "utf-8" -force8bit

    I became a windows error message.

    The log file ist empty except for the version information:

    2018.05.22 10:29:35 (Tue)------------Start of Session-----------------
    Blat v3.2.20 (build : May 16 2018 16:59:14)
    32-bit Windows, Full, Unicode

     
  • Chip

    Chip - 2018-05-22

    I am very sorry for that, Heiko. In my testing here at home, it worked properly in my test files. However, I did not have the -force8bit at the end of my command line. I found the problem that I created, I told the code to return a one instead of a zero when I found the -force8bit on the command line. This new 32-bit blat.exe has this fixed.

    Chip

     
  • Heiko Mück

    Heiko Mück - 2018-05-23

    Hi Chip,

    it looks very good now. Thanks a lot for your fast support.

    I will send the new messages to the institution.

    Heiko

     
  • Chip

    Chip - 2018-05-30

    Does the program work now for your client?

    Do you also want the 64-bit executable?

     
    • Heiko Mück

      Heiko Mück - 2018-05-30

      Hi Chip,

      it works perfect. Thanks a lot. 64 bit would be nice too.

      Mit freundlichen Grüßen

      Heiko Mück


      Schwerdtner Medizin-Software GmbH
      Q-MED Software für Ärzte und Kliniken

      Büro Nord: Hindenburgstr. 2-4, 30175 Hannover, Tel. 0511 165918-0, Fax 0511 165918-90
      Büro Süd: Neukirchner Weg 25, 92237 Sulzbach-Rosenberg, Tel. 0511 165918-40
      Trainingscenter Süd: Waldstr. 11, 67700 Niederkirchen

      Amtsgericht Hannover HRB 209865
      UStID DE254099439 - Steuernr. 26/613/071903
      Geschäftsführer Christoph Schwerdtner


      Am 30.05.2018 um 06:43 schrieb Chip <chipprogrammer@users.sourceforge.net <a="" href="mailto:chipprogrammer@users.sourceforge.net">chipprogrammer@users.sourceforge.net>:

      Does the program work now for your client?

      Do you also want the 64-bit executable?

      [support-requests:#51] https://sourceforge.net/p/blat/support-requests/51/ Blat change Content-Type and charset

      Status: open
      Group: v1.0 (example)
      Created: Wed May 02, 2018 08:43 AM UTC by Heiko Mück
      Last Updated: Wed May 23, 2018 10:12 AM UTC
      Owner: nobody

      Hi chip,

      first of all many thanks for the adjustments that you made for us in blat by now. This is all perfect.

      But now I have further problems with a certification because we have to deal with very special demands.

      Please look at the following code down here, that is the way it should be:

      Content-Type: multipart/mixed;
      boundary="------------080807020509080601050908"
      This is a multi-part message in MIME format.
      --------------080807020509080601050908
      Content-Type: text/plain; charset=utf-8
      Content-Transfer-Encoding: 8bit
      Body der 1-Click-Lieferung
      --------------080807020509080601050908
      Content-Type: application/xml; name="begleitdatei.xml"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="begleitdatei.xml"
      PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4
      ...
      --------------080807020509080601050908
      Content-Type: application/octet-stream; name="Z01123456699_31.05.2015_12.
      00.con.xkm"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="Z01123456699_31.05.2015_12.00.
      con.xkm"
      XJ6dG51bW1lci9CU05SOiAwMTAxMDAzMDAgICAgICAgICAgICAgIA0KRXJzdGVsbHVuZ3Nk
      YXR1bTogMTguMDkuMjAxNSAxMTowNjowMSAgIA0KUGFrZXQgMS8xICAgICAgICAgICAgICAg
      ICAgICAgICAgICAgICAgIA0KDQoqWEtNKg0KMS4yNiAgDQoxICAgIA0KMSAgICANCjcgDQox

      My message with blat looks like this:

      Content-Type: multipart/mixed;
      boundary="------------080807020509080601050908"
      This is a multi-part message in MIME format.
      --------------080807020509080601050908
      Content-Transfer-Encoding: 7BIT
      Content-Type: text/plain;
      charset="ISO-8859-1"
      Body der 1-Click-Lieferung
      --------------080807020509080601050908
      Content-Type: text/xml; name="begleitdatei.xml"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="begleitdatei.xml"
      PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4
      ...
      --------------080807020509080601050908
      Content-Type: application/octet-stream; name="Z01123456699_31.05.2015_12.
      00.con.xkm"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="Z01123456699_31.05.2015_12.00.
      con.xkm"
      XJ6dG51bW1lci9CU05SOiAwMTAxMDAzMDAgICAgICAgICAgICAgIA0KRXJzdGVsbHVuZ3Nk
      YXR1bTogMTguMDkuMjAxNSAxMTowNjowMSAgIA0KUGFrZXQgMS8xICAgICAgICAgICAgICAg
      ICAgICAgICAgICAgICAgIA0KDQoqWEtNKg0KMS4yNiAgDQoxICAgIA0KMSAgICANCjcgDQox

      That's the way I use blat for the message above:

      "C:\QMED\Programme\blat\blat.exe" -q -to "abrechnung.zert@kv-safenet.de abrechnung.zert@kv-safenet.de" -server localhost -port 25 -u q-med.1 -pw 06123456!Mia1975@ABC? -f "q-med.1@kv-safenet.de q-med.1@kv-safenet.de" -log C:\QMED\DATEN\1click\blat\1click_30042018_150344.log -s "1-Click Abrechnung" -attach "C:\QMED\Daten\Profiles\27\temp\begleitdatei.xml,C:\QMED\DATEN\Abrechner\16\KVDT\KVDT-2018.2\Z01241234601_12.04.2018_11.12.con.XKM" -body "1-Click-Abrechnung" -x "X-KVC-Dienstkennung: 1ClickAbrechnung;Lieferung;V2.0" -x "X-KVC-Sendersystem: Q-MED;279.363" -superdebugT

      Is there any possibility to change the Content-Type, charset and Content-Transfer-Encoding at the moment for all boundaries?
      With your last change we were able to change the Content-Discription.
      If not, it would be very helpful for us when you were able to make another adjustment.

      Many thanks and best regards

      Sent from sourceforge.net http://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/blat/support-requests/51/ https://sourceforge.net/p/blat/support-requests/51/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #51

  • Chip

    Chip - 2018-05-31

    Here is the 64-bit version.

     
    • Heiko Mück

      Heiko Mück - 2018-06-01

      Thank you

      Mit freundlichen Grüßen

      Heiko Mück


      Schwerdtner Medizin-Software GmbH
      Q-MED Software für Ärzte und Kliniken

      Büro Nord: Hindenburgstr. 2-4, 30175 Hannover, Tel. 0511 165918-0, Fax 0511 165918-90
      Büro Süd: Neukirchner Weg 25, 92237 Sulzbach-Rosenberg, Tel. 0511 165918-40
      Trainingscenter Süd: Waldstr. 11, 67700 Niederkirchen

      Amtsgericht Hannover HRB 209865
      UStID DE254099439 - Steuernr. 26/613/071903
      Geschäftsführer Christoph Schwerdtner


      Am 01.06.2018 um 00:01 schrieb Chip <chipprogrammer@users.sourceforge.net <a="" href="mailto:chipprogrammer@users.sourceforge.net">chipprogrammer@users.sourceforge.net>:

      Here is the 64-bit version.

      Attachments:

      blat.exe https://sourceforge.net/p/blat/support-requests/_discuss/thread/cd379ab0/3435/attachment/blat.exe (353.3 kB; application/x-msdownload)
      [support-requests:#51] https://sourceforge.net/p/blat/support-requests/51/ Blat change Content-Type and charset

      Status: open
      Group: v1.0 (example)
      Created: Wed May 02, 2018 08:43 AM UTC by Heiko Mück
      Last Updated: Wed May 30, 2018 04:43 AM UTC
      Owner: nobody

      Hi chip,

      first of all many thanks for the adjustments that you made for us in blat by now. This is all perfect.

      But now I have further problems with a certification because we have to deal with very special demands.

      Please look at the following code down here, that is the way it should be:

      Content-Type: multipart/mixed;
      boundary="------------080807020509080601050908"
      This is a multi-part message in MIME format.
      --------------080807020509080601050908
      Content-Type: text/plain; charset=utf-8
      Content-Transfer-Encoding: 8bit
      Body der 1-Click-Lieferung
      --------------080807020509080601050908
      Content-Type: application/xml; name="begleitdatei.xml"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="begleitdatei.xml"
      PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4
      ...
      --------------080807020509080601050908
      Content-Type: application/octet-stream; name="Z01123456699_31.05.2015_12.
      00.con.xkm"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="Z01123456699_31.05.2015_12.00.
      con.xkm"
      XJ6dG51bW1lci9CU05SOiAwMTAxMDAzMDAgICAgICAgICAgICAgIA0KRXJzdGVsbHVuZ3Nk
      YXR1bTogMTguMDkuMjAxNSAxMTowNjowMSAgIA0KUGFrZXQgMS8xICAgICAgICAgICAgICAg
      ICAgICAgICAgICAgICAgIA0KDQoqWEtNKg0KMS4yNiAgDQoxICAgIA0KMSAgICANCjcgDQox

      My message with blat looks like this:

      Content-Type: multipart/mixed;
      boundary="------------080807020509080601050908"
      This is a multi-part message in MIME format.
      --------------080807020509080601050908
      Content-Transfer-Encoding: 7BIT
      Content-Type: text/plain;
      charset="ISO-8859-1"
      Body der 1-Click-Lieferung
      --------------080807020509080601050908
      Content-Type: text/xml; name="begleitdatei.xml"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="begleitdatei.xml"
      PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4
      ...
      --------------080807020509080601050908
      Content-Type: application/octet-stream; name="Z01123456699_31.05.2015_12.
      00.con.xkm"
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename="Z01123456699_31.05.2015_12.00.
      con.xkm"
      XJ6dG51bW1lci9CU05SOiAwMTAxMDAzMDAgICAgICAgICAgICAgIA0KRXJzdGVsbHVuZ3Nk
      YXR1bTogMTguMDkuMjAxNSAxMTowNjowMSAgIA0KUGFrZXQgMS8xICAgICAgICAgICAgICAg
      ICAgICAgICAgICAgICAgIA0KDQoqWEtNKg0KMS4yNiAgDQoxICAgIA0KMSAgICANCjcgDQox

      That's the way I use blat for the message above:

      "C:\QMED\Programme\blat\blat.exe" -q -to "abrechnung.zert@kv-safenet.de abrechnung.zert@kv-safenet.de" -server localhost -port 25 -u q-med.1 -pw 06123456!Mia1975@ABC? -f "q-med.1@kv-safenet.de q-med.1@kv-safenet.de" -log C:\QMED\DATEN\1click\blat\1click_30042018_150344.log -s "1-Click Abrechnung" -attach "C:\QMED\Daten\Profiles\27\temp\begleitdatei.xml,C:\QMED\DATEN\Abrechner\16\KVDT\KVDT-2018.2\Z01241234601_12.04.2018_11.12.con.XKM" -body "1-Click-Abrechnung" -x "X-KVC-Dienstkennung: 1ClickAbrechnung;Lieferung;V2.0" -x "X-KVC-Sendersystem: Q-MED;279.363" -superdebugT

      Is there any possibility to change the Content-Type, charset and Content-Transfer-Encoding at the moment for all boundaries?
      With your last change we were able to change the Content-Discription.
      If not, it would be very helpful for us when you were able to make another adjustment.

      Many thanks and best regards

      Sent from sourceforge.net http://sourceforge.net/ because you indicated interest in https://sourceforge.net/p/blat/support-requests/51/ https://sourceforge.net/p/blat/support-requests/51/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #51


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.