How do get attachment without triggering flag chaging from unread to read?
Hi all,
In IMAP, is there anyway to get the attachment without flipping the flag from unread to read?
here's my code:
store = session.getStore(IMAP);
store.connect("someHost", somePort, "someLoginName", "somePwd");
folder = (IMAPFolder)store.getFolder(INBOX);
folder.open(Folder.READ_WRITE);
javax.mail.Message message = folder.getMessageByUID(someUID);
if (message.isMimeType("audio/wav")) {
InputStream is = message.getInputStream();
while (nBytesRead != -1) {
nBytesRead = is.read(buffer); // read the attachment from stream
...here's the bodystructure of the email:
comand:
A6 FETCH 3 (BODYSTRUCTURE)
response:
* 3 FETCH (BODYSTRUCTURE ("AUDIO" "WAV" ("NAME" "AUDIO.WAV" "TYPE" "Unknown") NIL NIL "BASE64" 7874 NIL NIL NIL))
command:
A7 FETCH 3 (BODY[TEXT]<0.7874>)
response:
* 3 FETCH (FLAGS (\Seen VOICE) BODY[TEXT]<0> {7874}
[binary data...]
As you see, the server sets the message to Seen (which is read state). How do I not set the flag to Seen?
Thanks.
Grace
Why not just set it back to Not Seen after you do that?
Similar Messages
-
How to get a list of displayed columns from a UIX read only table
I am using JDev 9.0.5.2 ADF UIX. Is there a way to get all the columns and/or column labels displayed in a UIX read only table? I would like to be able to do this in my DataForwardAction.
Please don't post the same question multiple times.
-
How create mail alert without triggering the event.
1. SR 3-4924626351: How create mail alert without triggering the event.
We wanted to send alert mail every 10 days or 15 days or 1 month to a reporting manager of Opportunity Owner with details of that Opportunity. I don’t want to use any triggering of event like the Following. When new opportunity is created When modified Opportunity is saved etc.Raju,
If you don't want to use the triggering event, you will have to do this manually.
Manually:
- Create a Web Link on the SR with and embed the mailto: function with the receivers email and subject and body embedded in the url (you can find this link on Google)
- When this link is clicked, an email window will open with all the details you provide, and you can click the send button to send the email.
- You will have to do this manually every 10-15 days or whatever is the duration
Auto:
- Create a time based workflow on a new Opportunity Created event
- create a action to send an email notification to the concerned person (details in the workflow properties)
- This workflow will auto send an email every 10-15 days to the opportunity Manager.
The time based workflow is the best option I see. Do you see any issue/ concerns with auto generated emails?
Hope this helps!
Royston -
How to get an ArrayList Object in servlet from JSP?
How to get an ArrayList Object in servlet from JSP?
hi all
please give the solution for this without using session and application...
In test1.jsp file
i am setting values for my setter methods using <jsp:usebean> <jsp:setproperty> tags as shown below.
After that i am adding the usebean object to array list, then using request.setAttribute("arraylist object")
---------Code----------
<jsp:useBean id="payment" class="com.common.PaymentHandler" scope="request" />
<jsp:setProperty name="payment" property="strCreditCardNo" param="creditCardNumber" />
<%-- <jsp:setProperty name="payment" property="iCsc" param="securityCode" /> --%>
<jsp:setProperty name="payment" property="strDate" param="expirationDate" />
<jsp:setProperty name="payment" property="strCardType" param="creditCardType" />
<%--<jsp:setProperty name="payment" property="cDeactivate" param="deactivateBox" />
<jsp:setProperty name="payment" property="fAmount" param="depositAmt" />
<jsp:setProperty name="payment" property="fAmount" param="totalAmtDue" /> --%>
<jsp:useBean id="lis" class="java.util.ArrayList" scope="request">
<%
lis.add(payment);
%>
</jsp:useBean>
<%
request.setAttribute("lis1",lis);
%>
-----------Code in JSP-----------------
In testServlet.java
i tried to get the arraylist object in servlet using request.getAttribute
But I unable to get that arrayObject in servlet.....
So if any one help me out in this, it will be very helpfull to me..
Thanks in Advance
EdwardHi,
Im also facing the similar problen
pls anybody help..
thax in advance....
Litty -
How to get the values of Select-options from the screen.
The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.
Hi,
Refer this following code..this will solve your problem...
"Following code reads value entered in s_po select options and willprovide search
"help for s_item depending upon s_po value.
REPORT TEST.
TABLES : ekpo.
DATA: BEGIN OF itab OCCURS 0,
ebelp LIKE ekpo-ebelp,
END OF itab.
SELECT-OPTIONS s_po FOR ekpo-ebeln.
SELECT-OPTIONS s_item FOR ekpo-ebelp.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
DATA:
dyn_field TYPE dynpread,
temp_fields TYPE TABLE OF dynpread,
zlv_dynpro TYPE syst-repid.
zlv_dynpro = syst-repid.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = zlv_dynpro
dynumb = syst-dynnr
request = 'A'
TABLES
dynpfields = temp_fields
EXCEPTIONS
OTHERS = 0.
LOOP AT temp_fields INTO dyn_field.
IF dyn_field-fieldname EQ 'S_PO-LOW'.
SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
WHERE ebeln EQ dyn_field-fieldvalue.
EXIT.
ENDIF.
ENDLOOP. -
I update my IPhone4 to IOS6 from IOS4.3.3. My all songs are missing in the Iphone4. How to get those songs into my Iphone from ITunes. Even after sync also not coming to IPhone.
The iphone is not storage/backup device.
The sync is one way - computer to iphone.
The only exception is itunes purchases. File>Devices>Transfer Purchases
You should copy everything from your old computer, or your backup copy of your old computer, to your new one. -
How to get the current logged in username from windows and put it into an AS var
Hello,
I was hopeing someone would know how to get the current logged in username from windows and put it into a var, so I can create a dynamic text box to display it.
Thanks in advance
MichaelJust for everyone’s info, this is the script I have used to get the logged in windows username into flash ---- not and air app.
In the html page that publishes with the .swf file under the <head> section:-
<script language="JavaScript" type="text/javascript">
function findUserName() {
var wshell=new ActiveXObject ("wscript.shell");
var username=wshell.ExpandEnvironmentStrings("%username%");
return username;
</script>
The ActionScript:-
import flash.external.ExternalInterface;
var username:String = ExternalInterface.call ("findUserName");
trace (username); // a quick test to see it in output -
i want to change my region and i don't know how to get rid of the remaing amout from my gift card ($0.48)
Request that iTunes Support zreo balance your account.
iTunes Support -
http://www.apple.com/support/itunes/ -
How to get a confirmation when your email is delivered or read ?
With Mail app ,How to get a confirmation when your email is delivered or read?
When I send mail with Mail app , there is flying letter pops up. But now I could not see anymore. Do you know how can I active that animation ?
Thanks for your help -
How to Get details of list of SC from list of PO & vice versa ?
Hello All,
Can Please anyone tell me how to get the list of Shopping Carts from the list of PO. I have list of Purchase orders numbers. Can you please suggest any standard table or combination of standard tables from which I can get this report ?
We have Stand alone system and do not have access to back end system.
Thank you in advance.
Digantyou can use below code
TYPES: BEGIN OF ty_po_guid_sc_guid,
po_guid TYPE swo_typeid,
sc_guid TYPE swo_typeid,
END OF ty_po_guid_sc_guid.
TYPES: BEGIN OF ty_sc_guid_sc_num,
sc_guid TYPE guid,
sc_num TYPE crmt_object_id_db,
END OF ty_sc_guid_sc_num.
DATA: lt_po_guid_sc_guid TYPE STANDARD TABLE OF ty_po_guid_sc_guid,
ls_po_guid_sc_guid TYPE ty_po_guid_sc_guid,
lt_sc_guid_sc_num TYPE STANDARD TABLE OF ty_sc_guid_sc_num,
ls_sc_guid_sc_num TYPE ty_sc_guid_sc_num.
*Get the SC guid related to PO guid
SELECT a~objkey AS po_guid c~objkey AS sc_guid INTO TABLE lt_po_guid_sc_guid
FROM srrelroles AS a
JOIN bbp_pdbinrel AS b ON a~roleid EQ b~role_b
JOIN srrelroles AS c ON b~role_a EQ c~roleid
FOR ALL ENTRIES IN lt_po_guid_sc_guid
WHERE a~objkey EQ lt_po_guid_sc_guid-po_guid.
LOOP AT lt_po_guid_sc_guid INTO ls_po_guid_sc_guid.
MOVE ls_po_guid_sc_guid-sc_guid TO ls_sc_guid_sc_num-sc_guid.
APPEND ls_sc_guid_sc_num TO lt_sc_guid_sc_num.
ENDLOOP.
IF lt_sc_guid_sc_num[] IS NOT INITIAL.
* Get the shopping cart number
SELECT a~guid AS sc_guid b~object_id AS sc_num INTO TABLE lt_sc_guid_sc_num
FROM crmd_orderadm_i AS a
JOIN crmd_orderadm_h AS b ON a~header EQ b~guid
FOR ALL ENTRIES IN lt_sc_guid_sc_num
WHERE a~guid = lt_sc_guid_sc_num-sc_guid
AND b~object_type = 'BUS2121'.
ENDIF.
<removed>
Please do not ask for points. Message was edited by: Zoltan Keller -
How to get POF object's field value from query result
hi,all:
I want to get field value from the query result, my code is below
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
Contact c=(Contact)iter.next();
System.out.println ("firstame####=" + c.getFirstName());
* but I get error*
Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
at com.oracle.handson.QueryExample.query(QueryExample.java:86)
at com.oracle.handson.QueryExample.main(QueryExample.java:43)
who can tell me how to get POF object's field value from query resultHi,
If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
Map.Entry entry = iter.next();
Contact c=(Contact)entry.getValue();
System.out.println ("firstame####=" + c.getFirstName());
}JK -
How to get data with the raw pattern from resultset ?
would you tell me how to get data with the raw pattern from resultset ?
thank you in advance!
longgger2000I tried getBytes() and getObject()
, but I can not get the right result , for example the
data in oracle database is 01000000DFFF, when In used
the method of getBytes() and getObject(), I get the
result of [B@1c2e8a4, very different , please tell me
why !
thank you
longgger2000
[B is byte arrayseem that it return an bytes array for you. -
How to get standard program ,script,smartforms all from sap
hi friends
how to get standard program ,script,smartforms all from sap.
thanks®ards
BabasishHi,
reports:
goto se38
all programs not starting with y or z will be sap std programs only
same for se71 scripts
samse for smartforms
but the use of those will be known when you see the documentation
for each programme
for std programs there will be documentation available so that you can understand
why they have developed that object
thanks & regards,
Venkatesh -
How to get result without single cotes in ''Cast(Multiset( '' Result.
select cast(multiset(select column_name
from user_tab_columns
where table_name = 'DAILY_PRODN_MIS'
and column_name like '%STOCK%'
order by column_name) as tab_type) result from dual;
RESULT
TAB_TYPE('BAGS_STOCK', 'BLUE_DUST_STOCK', 'CEMENT_STOCK', 'CEMENT_STOCK_33', 'CEMENT_STOCK_43', 'CEMENT_STOCK_53', 'CK_ADJ', 'COAL_IND_D_STOCK', 'COAL_IND_D_STOCK_ADJ', 'COAL_IND_E_STOCK', 'COAL_IND_E_STOCK_ADJ', 'COAL_IND_F_STOCK','OCK_ADJ', 'MTD_COAL_IMP_D_STOCK_ADJ', 'MTD_COAL_IMP_E_STOCK_ADJ', 'MTD_COAL_IND_A_STOCK_ADJ', 'MTD_COAL_IND_B_STOCK_', 'YTD_COAL_IMP_B_STOCK_ADJ', 'YTD_COAL_IMP_C_STOCK_ADJ', 'YTD_COAL_IMP_D_STOCK_ADJ', 'YTD_COAL_IMP_E_STOCK_ADJ')
How can i get result without single cotes for each column.Your query currently returns a collection type (tab_type) whereas it appears you want to return a delimited string.
There are actually quite a few ways to achieve this - with your own function, with a user-defined aggregate functions (e.g. Tom Kyte's stragg), with the MODEL clause or with CONNECT BY, e.g.
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> SELECT table_name,
2 SUBSTR (MAX (SYS_CONNECT_BY_PATH (
3 column_name, ',')), 2) column_names
4 FROM (SELECT table_name, column_name,
5 ROW_NUMBER () OVER (
6 PARTITION BY table_name
7 ORDER BY column_id) column_order
8 FROM user_tab_columns
9 WHERE table_name = 'BANK_ACCOUNT'
10 AND column_name LIKE '%U%') utc
11 START WITH column_order = 1
12 CONNECT BY column_order = PRIOR column_order + 1
13 AND table_name = PRIOR table_name
14 GROUP BY table_name;
TABLE_NAME COLUMN_NAMES
BANK_ACCOUNT ACCOUNT_NAME,ACCOUNT_NUMBER
SQL> -
How to get a simple form to populate from workflow container?
We are triggering a custom workflow from the creation of a specific type of financial document (BKPF) based on doc type. I am able to make this occur after I implemented OSS Note 336305 onto our v4.7 Enterprise system.
I would like to make the first task a simple form that will display certain fields from the FI document and allow changing. I created a structure containing the fields I want displayed on the form and can get the form to display. However, I am unable to get the form populated with the information from the document. I'm suspect it's a binding problem but don't know where to begin. My container element contains both BKPF and the structure I created for the simple form.
I must warn you that I am new to Workflow having only taken the two classes at SAP Education, so any explaination will need to be detailed and simple.
Thanks for the help.
Joanne JohnsonSince I made this entry yesterday, I decided I needed a method that will populate the form structure prior to displaying the form. I created a subtype ZBKPF of BKPF and added a method to populate structure. I know the method works correctly because I debugged the code and saw that it executes and fills the structure fields. However, it doesn't update the structure fields in the container correctly. So obviously I have a binding problem. I'm not sure how to get the container fields populated once I populate the structure. Thoughts?
Maybe you are looking for
-
I have a number of captivate animations that have mouse clicks. However even though I have set and checked all mouse clicks the 'click' audio does not consistently work. Is there a trick to setting the audio click. I am using Captivate V2.0.0 build 1
-
Serialization without writing it in a file
I need to serialize array of object. I can't use the file to store my serialized objects. I am trying to use ByteArrayOutputStream() for this purpose. I have the follwoing doubts: 1) Can i write the array object as a one object or do i need to write
-
BC4J - reverse generation - not all entities and views in same package
Hi I want to use reverse generation, but separate all entity objects in package (my.entities) and View Object and view links in (my.views) not all in one package. I can do this by generating entities first and then creating view objects and view link
-
Adwords crashing when opening after updates loaded last night- any clues
After loading recent updates when I try to access my Adwords account the browser constantly loads then crashes with a message Apples been advised. I will assume they will respond when they get around to it. I haven't loaded another browser yet wonder
-
ODI - cant see the step tasks from operator.
I've been working with ODI10.1.5 and I have the following problem: 09/26/2012 04:40:34 PM(DwgCmdExecutionThread): 27 - 0 - 09/26/2012 04:40:34 PM(DwgCmdExecutionThread): 28 - 7 - 09/26/2012 04:40:34 PM(DwgCmdExecutionThread): 29 - 0 - 09/26/2012 04:4