ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

SNDSMTPEMM Corrupting Excel File

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SNDSMTPEMM Corrupting Excel File

    I am attempting to email a file from the IFS using SNDSMTPEMM. This file type is xlsx and/or xlsx (I tried both and it corrupts both).

    Here are the options I am specifying for SNDSMTPEMM:

    Code:
    SNDSMTPEMM RCP((MY@EMAIL.COM)) SUBJECT('test report') NOTE('test report') ATTACH(('/Sales File.xls' *EXCEL *BIN)) CHARSET(*UTF8 *DFT) CONTENT(*PLAIN) SMIME(*NONE)
    When I receive the email with the attachment, I receive several others that "appear" to be MIME content in the email. When I attempt to open the attachment (an xls file), Excel states that it is corrupted. I then proceed to download the xls file from the IFS manually and I can open it just fine (so I know the xls file is not already corrupted, it has something to do with SNDSMTPEMM).

    Has anyone had any experience with this?

    FYI, I did some research and found a post about changing CHGPOPA MSGSPLIT(*NOMAX). I tested this as well and it doesn't work. I guess I'll start working through various combination of options to see if I can find one that works. I was hoping someone may have found the solution already. ;-)


  • #2
    Your command works on our system (V7R1) - the file is not corrupt when received.

    Is it possible that your file is actually .xlsx, but you're using the .xls extension for its name?

    Cheers,

    Emmanuel

    Comment


    • #3
      Originally posted by EmmanuelW1 View Post
      Your command works on our system (V7R1) - the file is not corrupt when received.

      Is it possible that your file is actually .xlsx, but you're using the .xls extension for its name?

      Cheers,

      Emmanuel

      Emmanuel. Thanks for testing that! Both file types are accurate to that type of file (XLSX is indeed XLSX and XLS is indeed XLS). Can you do me a huge favor and post what your CHGPOPA settings are? Also, did you attach an XLS or XLSX? The reason I ask is I think xlsx is technically a zip file that contains xml files.

      Comment


      • #4
        No problem - I tested with a .xls file. But I also renamed a .xlsx file to .xls, which made Excel unhappy about opening it.

        We don't run POP here - our settings are unchanged from default. Our mail server is MS Exchange, with Outlook as the client.

        Cheers,

        Emmanuel

        Comment


        • #5
          Originally posted by EmmanuelW1 View Post
          No problem - I tested with a .xls file. But I also renamed a .xlsx file to .xls, which made Excel unhappy about opening it.

          We don't run POP here - our settings are unchanged from default. Our mail server is MS Exchange, with Outlook as the client.

          Cheers,

          Emmanuel

          Thanks again. We are using mail relay but I found a post out there where someone had the exact same issue as me and it was resolved by change the CHGPOPA setting. I now have to wonder if it's an issue with our SMTP settings. Also, just to confirm, you are opening the XLS to confirm it's not corrupted, correct?

          Comment


          • #6
            Yes!

            Have you tried other types of files, such as Word documents? Do they come through corrupted as well?

            Cheers,

            Emmanuel

            Comment


            • #7
              Originally posted by EmmanuelW1 View Post
              Yes!

              Have you tried other types of files, such as Word documents? Do they come through corrupted as well?

              Cheers,

              Emmanuel

              Looks like .doc and .docx types come through just fine.

              Comment


              • #8
                Now it seems I'm receiving several of the same emails even though I only send 1. We use GMAIL as our corporate email.

                Comment


                • #9
                  ...spaces in the file name. grrrrr. Of course the one thing I never posted (to preserve some privacy of our system) is what caused the problem. The other problem is absolutely the file size.

                  Comment

                  Working...
                  X