Hi Sharon,

I downloaded  a binary file viewer to view these two files, and did a 
comparison between their binary code( I attached a bitmap of the comparison). 
you can see from the image that the binary files are different at the very 
beginning.

I was wondering if the STAF email service change the file?

Thanks,

Cindy

From: Sharon Lucas [mailto:luc...@us.ibm.com]
Sent: May-05-11 1:06 PM
To: Cindy Zhu
Cc: staf-users@lists.sourceforge.net
Subject: Re: [staf-users] Extra characters in the email attachment

If you use a "smart" editor like Visual SlickEdit, etc (e.g. not notepad), to 
view the original text attachment file Harmony_Win72.txt, you'll see that it 
contains extra characters at the very beginning.  So, the email service is 
simply sending the file contents and the original text file does indeed contain 
extra characters at the beginning.  Note that the characters may not be part of 
the supported codepage on your Email service machine (and when viewed by an 
editor that doesn't support the characters, they may appear to not be there, 
e.g. such as if using notepad).  If you don't want the extra characters in the 
attachment, then you'll have to remove them from the file.

For example, when I view the original text attachment file Harmony_Win72.txt 
that you provided via Visual SlickEdit, it shows the extra characters:

[cid:image001.gif@01CC0B36.EB087000]


--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:        Cindy Zhu <c...@fekete.com>
To:        "staf-users@lists.sourceforge.net" <staf-users@lists.sourceforge.net>
Date:        05/04/2011 04:14 PM
Subject:        [staf-users] Extra characters in the email attachment
________________________________



Hi,

I have the following code to send out an email with two attachments.

The original text attachment sent is Harmony_Win72.txt, but in the attachment 
received, which was renamed to Harmony.txt, has extra characters at the very 
beginning.

Can you tell me why and help me to fix that? I really want the attachment 
exactly like the original copy.

Thanks,

Cindy


<script>
from com.ibm.staf import STAFUtil
emailTo = 'c...@fekete.com'                                                     
                                #owner of the automation scripter
emailFr = 'c...@fekete.com'
emailSubject = PRODUCT + ' ' + VERSION + ' Automation Test Results'
emailMessage = 'Attached is the Silk run results on 64 bit Win7.'
emailEmptyMessage = 'No Silk run results on 64 bit Win7. Time out occurred.'
emailAttachmentMachine = '1451W7.Fekete.com' # Machine where attachment files 
are located
silkResult = 'D:\\Silk\Apps\Harmony\TestResults\Harmony_Win72.txt'
bmp = 'D:\\Silk\Apps\Harmony\TestResults\LastScreenShot.bmp'
</script>
<sequence>

<!-- The following is to send email to QAs, LPs, and TAs with Silk result and 
snapshot on the 64-bit Win7 test client-->
<stafcmd name="'Sending email to the QA, LPs, and TAs'">
                                 <location>'local'</location>
                                 <service>'EMAIL'</service>
                                 <request>
                                 'SEND TO %s SUBJECT %s MESSAGE %s 
ATTACHMENTMACHINE %s TEXTATTACHMENT %s BINARYATTAcHMENT %s' \
                                 % (emailTo, STAFUtil.wrapData(emailSubject), 
STAFUtil.wrapData(emailMessage),STAFUtil.wrapData(emailAttachmentMachine), \
                                 
STAFUtil.wrapData(silkresult),STAFUtil.wrapData(bmp))
                                 </request>
</stafcmd>
[attachment "Harmony.txt" deleted by Sharon Lucas/Austin/IBM] [attachment 
"Harmony_Win72.txt" deleted by Sharon Lucas/Austin/IBM] 
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

<<inline: image001.gif>>

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to