Can I send message in byte format

hello
Why no one is answering me
but still I want to know that Can I send message in byte format to inbox
message.setContent(byte [] b, "text/plain");
And Can I receive mail in byte format from inbox.
String dis = new String((String)messagePart.getContent());
plz resolve my problem

Obviously you have a very skewed view of the world
based on what you want to do. The most common thing
people want to do with email is not send raw binary data.
The most common thing people want to do is send text to be
read by a human.
Nonetheless, it's very easy to send binary data. Again, the
most common case is sending text. The thing that's important
with text is that it appear as the same text at the other end.
That's easy. But if you have text where every CR, LF, and
space has to appear absolutely unchanged at the other end,
that requires a bit of extra work.
The demo program sendfile.java that comes with JavaMail
shows how to send a file as an attachment. That's the core
of the program. Here's the 6 lines of code you need to add
to that program to do what you want:
------- sendfile.java -------
100c100,104
< FileDataSource fds = new FileDataSource(filename);
FileDataSource fds = new FileDataSource(filename) {
public String getContentType() {
return "application/octet-stream";
};113a118,119
msg.saveChanges();
mbp2.setHeader("Content-Transfer-Encoding", "base64");Is that so hard?
If you don't want to send the file as an attachment, but rather as the one
and only body of the message, it's even easier. Let me know if I need
to write that program for you as well.
And if you already have the data in memory in a byte array, that's even
easier still.

Similar Messages

  • I have iPad 2 with wifi and no 3G. I want to use iMessage to talk to a friend in Russia from here in the UK. For some reason I can't send messages to her. Please try to make your answers basic and easy to follow as I'm not any good with technology :)

    Hi everyone!
    I'm wanting to use iMessage to talk to a friend in Russia. She has iPhone 4s and I have ipad2 wifi only. For some reason I can't send messages to her but I can to UK iPhones.
    Please could you make your answers easy to understand and in plain English I I'm not good with technology and I'm not up to date on the jargon :)
    Thanks in advance to anyone who can help!

    Hi everyone!
    I'm wanting to use iMessage to talk to a friend in Russia. She has iPhone 4s and I have ipad2 wifi only. For some reason I can't send messages to her but I can to UK iPhones.
    Please could you make your answers easy to understand and in plain English I I'm not good with technology and I'm not up to date on the jargon :)
    Thanks in advance to anyone who can help!

  • Can't send message on AT&T - won't connect to server. Anyone else having this issue?

    All of a sudden I can't send messages on my AT&T account. I get a message that Thunderbird cannot connect to server (STMP). Called AT&T and they verified all the settings; I can access my email account on Apple Mail and through Yahoo (AT&T's email provider) yet I cannot send messages on Thunderbird. I can receive but not send.
    I did try deleting the account and re-establishing it however that did not help. Anybody else have this issue?

    https://support.mozilla.org/en-US/kb/cannot-send-messages

  • I can't send message to some contact but they can sent me message Blackberry Pearl3g 9105

    Blackberry Pearl3g 9105
    I can't send message to some contact but they can sent me message.
    when they send me message I receive it but when I send them message it shows the sign X in red 
    Please help 

    both of you should delete each other as a contact in your BBM app.
    Reboot both devices.
    Then. one of you send a BBM invite to the other and try again.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • My email messages are not loading. I have not changed any settings. I can still send messages but cannot receive them

    As of 5:30 pm yesterday my emails stopped coming in. When I open the account it shows I have 23 messages but nothing loads. I can still send messages and my internet connection is strong. How can I fix this?

    Troubleshooting Apple Mail
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages
    SMTP servers keep going offline

  • I can't send messages or call people with my NEW iPhone 4s.

    Hello.
    I live in Sweden and I ordered my iPhone 4s some days ago, I got it on Wednesday.
    Ever since I got it I noticed that I was having problems with my carrier, "Tele2". I can't send messages or even make calls, and I'm very disappointed. And I also can't connect to the 3G network at times, it just goes away, and this always leads to a reboot.
    I have to restart my phone every 5 minutes, and THEN I can send about 1-2 messages, then it goes back to what it was before. Crap.
    And I also called the people on "Tele2" they said that they don't know if it's the software or if it's the hardware. And that I simply have to wait until they know.
    I'm just wondering. Is there anyone out there who's heard anything about solving any problems like these? Perhaps and update to 5.0.1 ? Please let me know, I would appreciate it very much!

    They said that it wasn't them, they contacted Apple and they were aware of the problem. But still Apple didn't know if it was hardware of software problems.

  • HT3529 can not sending message in oversea!

    Dear sir,
    My friend bought an iphon5 from USA to me for gift. but i can not sending message in oversea, i'v try eveything i can do including update ios to 6.1.2, what's happening?please help me to check.
    my phone's Imei:990002274354073
    SN:DNPJL7EAF8GK
    Best regards
    Chen Chen

    Hi JenV67,
    Thanks for visiting Apple Support Communities.
    You may find the steps in this article helpful:
    iPhone and iPod touch - Unable to delete email messages
    http://support.apple.com/kb/ts2475
    If the behavior continues, try the steps in our iPad troubleshooting assistant:
    http://www.apple.com/support/ipad/assistant/ipad/
    Regards,
    Jeremy

  • Can't send messages using third-party keyboards

    Hello all - I'm using Skype for iPad on iOS 8.1.. I've decided to install Swiftkey keyboard and since I've done that, I've noticed that I can't send messages. After writing them down, "send" button doesn't show up, until I switch back to default iOS keyboard.
    Have you seen this issue?
    Thanks,
    Daniel.

    I have the same problem with SwiftKey and skype on ipad. I'm able to send messages doing a trick but it's a bit annoying. You can tap on the text field so the keyboard comes out, flip the ipad between vertical and horizontal, tap anywhere so the keyboard disappears and then tap again on the text field. The send button will show up.
    Not ideal at all but at least you'll be able to send messages until the issue is resolved

  • I have problem with my contacts.  I can't send message if the contact didn't send me a message before.  How can I add new address?

    i have problem with my contacts.  I can't send message if the contact didn't send me a message before.  How can I add new address?

    Hi tizac,
    You will want to add them to your Contacts. 
    There's a "+" button at the bottom of the contact list on the left to add a contact.
    If you need to add the email address or phone number to an existing contact, there's an Edit button at the bottom of the contact info (on the right).
    Once you have the contact email address or phone number you want to message to, scroll all the way down to the bottom of their information and there are options to:
    Send Message               FaceTime
    Share Contact             Add to Favorites
    Of course choose "Send Message" to send an iMessage to them and you will start a new chat.  You will be given the options of how to contact them, via phone number (if they are on an iPhone) or email (if they are on an iPod touch or iPad).   They do need to be signed up for iMessage or it won't allow you to send.
    ivan

  • TS3276 I can't send messages with mail 6.0 of mountain lion, because I can't desactivate the option SSL (Secure sockets Layers); it is locked

    I can't send messages with mail 6.0 of mountain lion, because I can't desactivate the option SSL (Secure sockets Layers); it is locked

    Hi, i am having the same problem. this is what i have noticed.
    I have 2 x imac's and 2 x macbook air's
    i upgraded the 2 macbook air's and 1 of the imac's to Mountain Lion, all these have problems acessing sites that require you to login .
    the one remaining imac is still running lion and works perfect.
    i am using a dlink router with DD-WRT firmware, i tested teathering from my iphone and i can log into websites fine using the newly upgraded mac's.
    It's not a wireless issue as my imac is using an ethernet connection.
    is there a compatibility issue with some routers.

  • On my daughters iPad mini she can not send messages. She can receive them but the send button stays light gray after you type a message. It worked when we first set it up but now it does not. Tried resetting and logging out and back in. With no change.

    I can not send messages on an iPad mini the send button stays light gray and will not send. I can receive. I reset and logged out and back inn with no results. It worked fine when we first set it up. Any suggestions?

    Hello iMessage issues 1234,
    Thank you for the details of the issue your daughter is experiencing with sending messages on the iPad.  It sounds like you might have the Subject Field turned on. To disable this go to Settings > Messages > Show Subject Field.
    iPhone User Guide - Messages settings
    http://help.apple.com/iphone/7/#/iphf2d853e3
    If the Subject Field is not enabled but messages are still not sending, I recommend continuing with the following article:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Why i can´t send message by iMessage

    Hello friends
    I can't send message from iMessage (MBP or iMac) for my friend (use iPhone5S), but i can send for other people, and my friend can do the same, send for other people but can't send for me.

    Hi,
    If your Mac version is sending From your iPhone number check that the Messages app is set for a country or region in the iMessages account.
    Messages > Preferences > Accounts > iMessages account > Click th Details button > Sign In (again) > In the pane that then appears check the country code nearer the bottom.
    If they are sending to your iPhone Number they may need to add the Country Code.
    8:26 pm      Sunday; May 18, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Can't Send messages using mail on Bell South DSL

    My parents are using Bell South DSL and a Net Gear Wireless Router. I have a Linksys Wireless Router living in GA and everything works fine. Any ideas what is going on here?
    I receive all my email, I just can't send messages.

    Ernie,
    Greetings! I found this thread after trying in vain to set up my mom's email, which also stopped working with Bellsouth after the upgrade to 10.5 (now on 10.5.1). Email conversion was fine, and she, like others here, could receive mail but not send it.
    I have followed the directions here to the letter. Still no such luck. To clarify, mail.bellsouth.net, port 25, no authentication is the only entry in her outgoing mail server list (and it's selected). Moreover, when she checks Connection Doctor, it passes with flying colors - even connecting for outgoing email.
    Still pondering this one. I'm about "this close" to getting her a Gmail account (which I tested using my account - and it works fine, even IMAP). Of course if she can keep her existing account I think she'd prefer that, but I say go with whatever works ... !
    Other troubleshooting thoughts welcome!
    - Joe

  • I can not receive messages and i can't send messages also if someone rings me it, it rings at their end and then goes to voice mail but nothing at my end

    i can not receive messages and i can't send messages also if someone rings me it, it rings at their end and then goes to voice mail but my phone doesn't ring

    Talk to your carrier.  Sounds like something is not provisioned right on your account.

  • I have full signal and have wifi but I'm can't send messages or receive them. I can't make phone calls either.

    HI
    I have full signal and have wifi but I'm can't send messages or receive them. I can't make phone calls either. it picks and chooses when I can receive them and make calls. It only works everytime I turn my phone off.

    Try turning on Airplane mode for a little bit (20-30 seconds) and turn it back off. see if that doesn't allow you to re-connect.
    In my current project my office receives no signal at all. I have to do this almost every time I leave the office in order to get a signal.

Maybe you are looking for

  • How to create event based process chains

    Hi All, I would like to know about event based process chains. In connection to this, could you please answer the following queries, 1. How to create events 2. How to link created event to the process chain in the same BI or BW system and as well as

  • Unlocking the AD account through Oracle Identity Manager 9.1.0.2

    Hi friends, I have a question about Oracle Identity Manager 9.1.0.2, I have configured the Active Directory connector for Identity Manager, you can perform the unlock process when the account was blocked by Active Directory failed attempts at authent

  • Report painter object name change during transport

    We have a requirement to add 5 fields (In selection screen) to report painter reports ( Reports of CJE3 and GRR3 ).We created Z reports as a copy of standard reports, added required 5 fields by implementing SAP notes and other settings .We have also

  • Adobe Acrobat Pro XI Asking for Serial Number

    I am a Creative Cloud subscriber. Downloaded and installed Adobe Acrobat Pro XI today for the first time. When I launch the application, it tells me that my "trial" has expired and that I need to buy it or enter a serial number. Huh? What do I need t

  • What is a semaphore in a unix operating system

    Hi, Could you please explain What is a semaphore in a unix operating system how does it affect the oracle database.