Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
How I can capture data Outlook Forms with JavaMail ?
Edson Cezar
Ranch Hand
Posts: 119
2
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
First, Hi everyone !
I have a little problem, I need read data from Outlook Forms with JavaMail, but Outlook send for me a "VBA", a code with strangers characters.
Can someone help me ?
Thanks for all in advance !
Campbell Ritchie
Marshal
Posts: 79177
377
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Please explain a bit more. What are these stranger characters?
This question is too difficult for “beginning”, so I shall move it. Probably to the wrong place
Edson Cezar
Ranch Hand
Posts: 119
2
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I think this is a bad solution, therefore this worked and can read the VBA
//I did something stupid //Convert a binary stream for string while (stream.available() != 0) { char streamRead = (char) stream.read(); out += String.valueOf((char) streamRead); } Scanner sc = new Scanner(out); String convertBinary = sc.nextLine(); System.out.println(); byte[] bytes = convertBinary.getBytes(); StringBuilder stringBinary = new StringBuilder(); for (byte b1 : bytes) { int val = b1; for (int j = 0; j < 8; j++) { stringBinary.append((val & 128) == 0 ? 0 : 1); val <<= 1; } stringBinary.append(' '); } System.out.println(stringBinary);
Thanks for all
Edson Cezar
Ranch Hand
Posts: 119
2
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
//After I use this code for recover a util code, that I need import java.util.regex.*; public class RegexRemoveSpecialCharacters { public static void main( String args[] ) { String wayOut = RegexRemoveSpecialCharactersInput(); System.out.println( wayOut ); } private static String RegexRemoveSpecialCharactersInput() { String text = "Fé Sé Pé Pá @@@@@@ 123456" ; Pattern rules = Pattern.compile( "^[a-zA-Z0-9\\_\\s]+$" ); String wayOut = ""; for( int i = 0; i < text.length(); i++ ) { Matcher mt = rules.matcher(Character.toString(text.charAt( i ))); if( mt.matches() ) { wayOut += mt.group(); }else{ if( !( Character.isLetter( text.charAt( i ) ) ) ) { continue; } String aux = Character.toString( text.charAt( i ) ); boolean upperCaseFlag = false; if( Character.isUpperCase( aux.charAt( 0 ) ) ) { upperCaseFlag = true; aux = aux.toLowerCase(); } if( upperCaseFlag ) { aux = aux.toUpperCase(); } wayOut += aux; } } return wayOut; } }
Thanks for all.
No more fooling around. Read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to invoke outlook express and post the data into it using java or c++
vCalendar using JSP
Java Mail
Java API to search mails in MS outlook?
Pretty confused with these 2 hosting sites
More...