ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Issue with QtmmSendMail and attachments

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

  • Issue with QtmmSendMail and attachments

    Using Scott klement's BASE64 objects in combination with QtmmSendMail ..
    If I load the body with 'Text" -- (meaning I pull from within the RPG from Complile time array)
    the email arrives with both the .pdf attachment and the text. -- I am using content-type html/pdf
    Bottom of email




    once I swap the compile time array for another html document.
    (I pull this one from the IFS.) -- *Note I can send this HTML document as is using QtmmSendMail
    without attachments it sends perfectly -- Content-Type: text/html'

    PHP Code:
    QtmmSendMailFileName                  
                
    : %len(FileName)            
                : 
    fromAddr                  
                
    : %len(fromAddr)            
                : 
    recip                     
                
    : %elem(recip)              
                : 
    NullError); 
    It seems its something to do with my email -- formatting?? not sure.
    Anyone else have any experience with this?

    Thanks in advance
    Jamie




    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Don't waste your time.
    The MMAIL utility, distributed from site www.easy400.net, does that for you.
    MMAIL is public source code. You can read there how things are done.

    Giovanni

    Comment


    • #3
      You seerm to be missing a bunch of line breaks in your message body. Each MIME header needs to be on it's own line, but you have them all in one line. Also, there needs to be a blank line between the headers and data -- which you're missing. Also, your border is just a series of dashes, which can easily occur in regular text, so you definitely don't want to do that.

      Having said that, I do agree with Giovanni... it makes little sense to write your own, unless you need to surpass the capabilities of a tool like MMAIL.

      Comment


      • #4
        thanks -- got this running. moved from reading in from IFS to compile time array. That corrected the CRLF issue as well as the "--" line data. I agree also with MMAIL -- That said in some "situations" you are not allowed to load software.
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment

        Working...
        X