Changeset 1191


Ignore:
Timestamp:
May 16, 2011, 2:53:26 PM (14 years ago)
Author:
George Lilly
Message:

upgrade to send message text as well as attachment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CMIME.m

    r1184 r1191  
    7575TESTMAIL2 ;
    7676 ; TEST OF MAILSEND TO gpl.mdc-crew.net
    77  ;S ZTO("glilly@glilly.net")=""
     77 N C0CGM
     78 S C0CGM(1)="This is a test message."
     79 S C0CGM(2)="A Continuity of Care record is attached"
     80 S C0CGM(3)="It contains no Protected Health Information (PHI)"
     81 S C0CGM(4)="It is purely test data used for software development"
     82 S C0CGM(5)="It does not represent information about any person living or dead"
     83 S ZTO("glilly@glilly.net")=""
    7884 S ZTO("LILLY.GEORGE@mdc-crew.net")=""
     85 ;S ZTO("ncoal@live.com")=""
    7986 ;S ZTO("martijn@djigzo.com")=""
    8087 ;S ZTO("profmish@gmail.com")=""
     
    8693 . M @ZATTACH=GPL ; PUT IT IN THERE FOR NEXT TIME
    8794 S ZSUBJECT="TEST OF THE NEW MAILSEND ROUTINE"
    88  D MAILSEND(.GR,ZFROM,"ZTO",,ZSUBJECT,,ZATTACH)
     95 D MAILSEND(.GR,ZFROM,"ZTO",,ZSUBJECT,"C0CGM",ZATTACH)
    8996 ZWR GR
    9097 Q
     
    108115 S GM(3)=" "
    109116 S GM(4)=" "
    110  S GM(5)="--1234567"
     117 ;S GM(5)="--123456788888"
    111118 ;S GM(5)=$$REPEAT^XLFSTR("-",$L(X))
     119 S GM(5)="--123456899999"
    112120 S GM(6)="Content-Type: text/xml; name=""ccr.xml"""
    113121 S GM(7)="Content-Transfer-Encoding: base64"
     
    115123 S GM(9)=" "
    116124 S GM(10)=" " ; FOR THE END
    117  S GM(11)="--1234567--"
     125 ;S GM(11)="--123456788888--"
     126 S GM(11)="--123456899999--"
    118127 S GM(12)=" "
    119128 S GM(13)=" "
     129 S GG(1)="--123456899999"
     130 S GG(2)="Content-Type: text/plain; charset=ISO-8859-1; format=flowed"
     131 S GG(3)="Content-Transfer-Encoding: 7bit"
     132 S GG(4)=" "
     133 S GG(5)="This is a test message."
     134 S GG(6)="A Continuity of Care record is attached"
     135 S GG(7)="It contains no Protected Health Information (PHI)"
     136 S GG(8)="It is purely test data used for software development"
     137 S GG(9)="It does not represent information about any person living or dead"
     138 S GG(10)=" "
     139 S GG(11)="--123456899999--"
     140 ;S GG(11)="Content-Type: text/plain; charset=""us-ascii"""
     141 S GG(12)=" "
     142 ;S GG(13)="This is a test message."
     143 S GG(14)="A Continuity of Care record is attached"
     144 S GG(15)="It contains no Protected Health Information (PHI)"
     145 S GG(16)="It is purely test data used for software development"
     146 S GG(17)="It does not represent information about any person living or dead"
     147 S GG(18)=" "
     148 S GG(19)="--123456899999"
     149 S GG(20)="--987654321--"
    120150 K GBLD
     151 ;D QUEUE^C0CXPATH("GBLD","GGG",1,3) ; THE MESSAGE
     152 ;D QUEUE^C0CXPATH("GBLD","GG",1,10) ; THE MESSAGE
     153 I $D(MESSAGE)'="" D  ; THERE IS A MESSAGE
     154 . D QUEUE^C0CXPATH("GBLD","GG",1,4) ; THE MIME BOUNDARY
     155 . D QUEUE^C0CXPATH("GBLD",MESSAGE,1,$O(@MESSAGE@(""),-1)) ;THE MESSAGE
     156 . D QUEUE^C0CXPATH("GBLD","GG",10,10) ;A BLANK LINE
    121157 D QUEUE^C0CXPATH("GBLD","GM",5,9)
    122158 I $D(ATTACH)'="" D  ; IF WE HAVE AN ATTACHMENT
    123159 . D ENCODE("G2",ATTACH) ; ENCODE FOR SENDING
    124160 . D QUEUE^C0CXPATH("GBLD","G2",1,$O(G2(""),-1))
    125  D QUEUE^C0CXPATH("GBLD","GM",10,12)
     161 D QUEUE^C0CXPATH("GBLD","GM",11,12)
    126162 D BUILD^C0CXPATH("GBLD",GN)
    127163 ;S GGG=$NA(^GPL("MIME2"))
Note: See TracChangeset for help on using the changeset viewer.