JavaMail error in getting message variable

Hi SDN,
try{
          PrintWriter out=response.getWriter();
          InitialContext ctx=new InitialContext();
          Session session = (Session) ctx.lookup("java:comp/env/mail/Email");
          Properties props = session.getProperties();
          out.println("Mail From >>" + props.getProperty("mail.from")); //senders email id
          out.println("SMTP Server >>" + props.getProperty("mail.smtp.host")); // SMPT mail server name
          Message message = new MimeMessage(session);
          message.setFrom(new InternetAddress(props.getProperty("mail.from")));
          message.setRecipients(Message.RecipientType.TO, new InternetAddress[]{new InternetAddress(request.getParameter("Receipient"))});
          essage.setSubject(request.getParameter("Subject"));
          message.setContent(request.getParameter("Msg"),"text/plain");
          out.println("Message variable value" + message.getRecipients(Message.RecipientType.TO));     
          Transport.send(message);
          out.println("<br><b>Thank U. Your Message to "+request.getParameter("Recipient")+"was succesfully sent.<b>");
          catch(Exception e)
               e.printStackTrace();
We could not able to send a mail to the specified address using SMTP . Actual problem is the message variable in the above coding could not set the specified "from" address or "receipient" address . When we tried to display the set value it is returning the address as "Ljavax.mail.internet.InternetAddress;@57cd1b" . So suggest me how to overcome this.

Hi bshannon
I think the problem is not with the content method . when we try to set from address and To address using the corresponding methods , the value is not set. When we tried to get back internet address (TO, FROM) it is returning some other unknown address.
Regards
Basha

Similar Messages

  • Error while getting Message Id as File Name.

    Hi everyone,
         I am trying to get the file name as message id in the target side. For this I defined Variable Substitution in the receiver Communication Channel for the file Adapter.
    In the Filename Scheme I defined %test.xml%
    And in the  Variable Substitution Table I defined
    Variable Name:test.xml
    Reference:message:message_id
    When i Check in the communication channel monitoring  I am getting this error.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: java.text.ParseException: Missing end token for start token at position 0: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Missing end token for start token at position 0
    Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Missing end token for start token at position 0
    I didnot defined any User Defined Function.
    Any help would be appreciated.
    Regards,
    Varun

    >>In the Filename Scheme I defined %test.xml%
    use %test%.xml
    >>Variable Name:test.xml
    >>Reference:message:message_id
    use
    Variable Name:test
    Reference:message:message_id
    An interesting usage of Variable Substitution in XI By Sameer Shadab
    Thanks
    SaNv...

  • How can I get past the error message "Variables are not compatible DMB00"?

    Hello,
    I'm working in Desktop Intelligence XI and I'm using an Excel data provider and a universe data provider. I've linked the two providers on the common field "Cost_Code". The Excel data provider also has a "Cost_Code_Descr_xls" field so I've created a new variable that makes this description field a detail object associated with the "Cost_Code" dimension. This allows me to use both objects in the report.
    Some of the cost codes in my universe data provider are not found in my cost_code Excel provider so I'm trying to create a simple formula to deal with these null values:
    = if isnull(<Cost_Code_Descr_xls>) then "Unclassified" else <Cost_Code_Descr_xls>
    This is where I get the "Variables are not compatible" error.
    Any ideas on how to get around this error?
    Thanks!
    David

    Hi David,
    I might have been a bit to quick with just saying that the only thing you needed to do was replacing the object with the variable you created.
    The variable is only compatible with 'Cost Code' dimension, but not with any of the other dimensions in the report. Your header probably only contains the 'Cost Code' dimension and as such the formula isn't giving any problems. But your details contain ohter incompatible dimensions.
    What you need to do is also create detail variables for the other dimensions and relate those to the 'Cost Code' dimension. Use those newly created detail variables  in your report.
    Regards,
    Harry

  • Getting error while creating the variable of Schema Element type

    Hi everybody,
    For creating a variable of schema element type I am doing the following steps...
    Select 'Variables' after right clicking on bpel process. IN this window, go to 'Create VAriable' then select 'Element' type. Now in Type Choose, I expanded the my imported schema files. And selected a element type, then click ok to create this variable... I am getting the message...
    IN ORDER TO SAVE IMPORTED WSDL/SCHEMA FILES, YOU MUST HAVE A PARTNER LINK LOCATED UNDER THE CURRENT PROJECT DIRECTORY.
    What is mean by that.
    I have imported the schema files in project. AFter that I have imported them into the WSDL also. Now why I am getting error while creating the variable. However I can create variable directly in .BPEL file then everything is fine. And it is working also. But what is mean with the above error? Why I am not able to create variable through GUI?
    Thanks.

    Hi,
    I have this same problem this morning, and I was going crazy, until I found this webpage on the internet:
    [http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process|http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process]
    The idea is that the jdeveloper is not very good working with directories with spaces on the directory name. If you move all your work to a directory without spaces, it will work smoothly. At least, it had worked for me.
    Regards,
    Nacho

  • Error message: variable might not have been initialized

    i am doing java programming and keep getting error messages: variable might not have been intitialized, the variables are 'one', 'two', and 'three' ,but at the very beginning i already had typed in String one,two,three...how do i fix this? this is part of my program:
    public class Titles
    public static void main(String[] args)
    String book1,book2,book3,the,a,first3,first,ffirst3,ffirst,fffirst3,fffirst,one,two,three;
    System.out.println("Enter the title of the first book");
    book1=IO.readString();
    book1=book1.trim();
    System.out.println("Enter the title of the second book");
    book2=IO.readString();
    book2=book2.trim();
    System.out.println("Enter the title of the third book");
    book3=IO.readString();
    book3=book3.trim();
    the="the ";
    a="a ";
    first3=book1.substring(0,4);
    ffirst3=book2.substring(0,4);
    fffirst3=book3.substring(0,4);
    first=book1.substring(0,2);
    ffirst=book2.substring(0,2);
    fffirst=book3.substring(0,2);
    if (first3==the)
    book1=book1.substring(4);
    else
    book1=book1.substring(0);
    if (ffirst3==the)
    book2=book2.substring(4);
    else
    book2=book2.substring(0);
    if (fffirst3==the)
    book3=book3.substring(4);
    else
    book3=book3.substring(0);
    if (first==a)
    book1=book1.substring(2);
    else
    book1=book1.substring(0);
    if (ffirst==a)
    book2=book2.substring(2);
    else
    book2=book2.substring(0);
    if (fffirst==a)
    book3=book3.substring(2);
    else
    book3=book3.substring(0);
    int comp=book1.compareToIgnoreCase(book2);
    int comp1=book1.compareToIgnoreCase(book3);
    int comp2=book2.compareToIgnoreCase(book3);
    if (comp<0 && comp1<0)
    one=book1;
    else if (comp>0 && comp1>0)
    three=book1;
    else
    IO.reportBadInput();
    if (comp2>0 && comp1<0)
    two=book3;
    else if (comp2<0 && comp1<0)
    three=book3;
    else
    IO.reportBadInput();
    if (comp2<0 && comp>0)
    one=book2;
    else if (comp2>0 && comp<0)
    three=book2;
    else if (comp2<0 && comp<0)
    two=book2;
    else
    IO.reportBadInput();
    if (comp1>0 && comp2>0)
    one=book3;
    if (comp1<0 && comp>0)
    two=book1;
    IO.printString(one);
    IO.printString(two);
    IO.printString(three);

    It says "not initilailized", not "not declared". The code you posted is highly unreadable, but it's likely that the compiler complains that not in every case "one" will get assigned any value.
    At least do it like:
    String one = null;
    String two = null;
    ...

  • I'm trying to download a movie, but I keep getting message error that I have no more room and that I must delete some photos or videos in order to download more movies. How do I delete the videos in order to order more?

    I'm trying to purchase and download a movie, but I keep getting message error that I have no space. The error states that I must delete some photos or videos in order to download. I've gone to iPod then edit and deleted some videos, but I'm still getting the message. What is the correct way to delete the videos and should they still be there.

    They wont still be there if you delete them,but if you have those same photos on the main computer.

  • Can't get firefox sync to work. I keep getting 'Error While Syncing' message

    I am on Mac OS X 10.6.4, Snow Leopard on a Mini Mac a year old.
    I got a message from X Marks telling me they were shutting down.
    As I use my bookmarks every day and have thousands of them all sorted into folders I definitely never want to lose them or lose access to them if my house burns down or my computer is stolen!
    I was using Firefox 3.6 and followed X Marks advise and downloaded Firefox Sync...but...won't work....kept giving me the 'Error While Syncing' message after trying to sync for a while. I looked at the blog and tried a few things like resetting password, restarting computer, checking my setting etc., but no deal. So, as the Firefox Sync download page told me that if I was using Firefox 4 beta the feature was built in and I didn't need the download, I then downloaded Firefox 4....which has removed my X Marks option, which was at least viable till after Xmas! and I still have the 'Error While Syncing' message beside the Sync button on my status bar....so now I am completely at a loss. The only thing I can do if I can't fix it up is go back to 3.6 and go on using X Marks while it is still available and pray that you get this sorted out before they dissappear.
    I also like to be able to get my updated bookmarks on the other browsers I use, like Chrome and IE, so I would really appreciate it if you would include this cross browser sync capability as soon as you can. I have pledged X Marks that I would even pay for their service to continue as it seems they are so ahead of anyone else in their service and it is a large pain in the you know where that they can't keep going.
    Thanks. and I hope you can help. From the blogs it seems that I am not the only one having this problem of getting the Firefox Sync working

    @globaltruth
    Thank you for your suggestion. I tried it. Unfortunately, the error message still sits on my statusbar, right after the Firefox Sync image.

  • I am trying to download Yosemite. Repeatedly getting message:There was an error in the App Store. Please try again later."

    I am trying to download Yosemite. Repeatedly getting message:There was an error in the App Store. Please try again later."

    That cryptic error message might mean that the payment information in your account is invalid. Check with your credit-card issuer to see whether a charge was denied. If not, see below.
    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of this test is to determine whether the problem is localized to your user account. Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in OS X 10.7 or later, then you can’t enable the Guest account. The "Guest User" login created by "Find My Mac" is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.

  • While downloading apps from app store I'm getting unknown error has occurred message

    Hi
    I'm seeing the below problem from today morning..
    I am using iPhone 4 unlocked (direct from apple store ). I am getting 'A unknown error has ovcurred' message while trying to download free apps from AppStore.
    I am connected to wi-fi while doing this.
    I used to download without any issues earlier. Please advise on what could be the problem. Thank muvh

    Same problem here in Brazil.
    It seems to be a problem with logging in App Store in the Mac (Yosemite 10.10.2).
    When I tried the very same userid and password I was able to login in to use my iCloud account from the same computer and also from my iPhone.

  • I cannot open my itunes, I keep getting message, saying Itunes exe-system error. The progam can't start because SVCR80.dll is missing from your computer.?

    I cannot open my itunes, I keep getting message, saying Itunes exe-system error. The progam can't start because SVCR80.dll is missing from your computer.?

     
    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99807)

  • Getting Internal Error (-1101) occured (message 131-183) on SAP B1 Journal Entry.

    Hi,
    Im inputting data on journal entry module on SAP B1 when the message showed up, my computer is running on windows 8. (is it an OS problem?) Is there anyway that i could get rid of this error.
    Thanks and Regards,
    Christian

    Hi Christian,
    Please check below link.
    https://helpdesk.coresystems.ch/entries/20781833-Internal-error-131-occurred-131-183-FAQ-10062-
    SAP B1 client system we got error Internal Erro... | SCN
    Internal error (-1101) occurred [Message 131-183]
    Internal error (-1101) occured [Message 131-183]
    Hope this help
    Regards::::
    Atul Chakraborty

  • Running Mavericks, I was trying to get messages to run ICQ and apparently I changed a setting that now causes me to get an error message and shuts messages down.

    I am running Mavericks.
    I was trying to get "Messages" to play nice with ICQ. it was sending HTML format to the receiver on the other end.
    I saw online how to change the item typed to show up as plain text on the for the recipient.
    Unwisely, I didn't follow ALL the instructions (where it told me to make a copy on my desktop "in case" and I changed one of the settings incorrectly.
    Now when I try to start Messages up, it opens briefly, then says it encountered an error and needs to shut down.
    I can remove Messages, but before I do, I can't seem to find a place to re-download it.
    Any suggestions on the best way of handling this?

    Hi,
    Once you get to Lion (OS X 10.7) and higher the only way is to Restore the whole OS as several Apple App are included this way and are not available separately.
    It should be just the .plists that are involved.
    The com.apple.imagent.plist holds the account info as it provides a "listening" function on all logins before your start up the app.
    I would delete this one as well.
    If that does not work repeat the process and delete com.apple.ichat.plist itself.
    7:20 pm      Monday; March 24, 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

  • Hi all, I am trying to update my Ipad OS tO 5.1, but was unable, keep getting error in installing message? Please advice. Thx

    Hi all, I am trying to update my ipad OS to 5.1, but was unable, keep getting error in installing message. Please advices. Thx

    Try this - Disable your firewall and anitvirus software temporarily.  Then download and install the iOS update.
    After you install iOS 5.x, the next update can be installed when connecred via wireless.
     Cheers, Tom

  • Using Photoshop CC I cannot save images to folder from Camera Raw as Tif. I get message 'write permission error'. I am using Widows 7 Professional.

    I have just changed to Photoshop CC from CS4 and cannot now save images from Camera Raw. I get message 'write permission error'. I assume there is some permissions setting which did not exist with CS4.
    I cannot progress unless I revert to CS4. What am I failing to do?

    See if the suggestions, here, help, although this was back with CS6-cloud, not CC, so may not apply 100%:
    http://forums.adobe.com/message/4758115
    I'd suggest that rather than deleting the file, you move it out of the folder to somewhere else, in case things get worse and you need to put it back.
    I found this by Googling the error message. 
    If you can't figure it out, you might post in the "Downloading, Installing and Set Up" or "Adobe Creative Cloud" forums  since it seems to be related to the Cloud updates, and not necessarily ACR plug-in functionality, and I've seen India support people actually tackle problems posted there, which rarely happens in the ACR forum, although an ACR engineer may sometimes pop in to answer questions, they'd be less likely to know how to fix deployment issues.

  • Photoshop CS4 - getting error message that states: Could not complete your request because of a program error. Getting this message when

    Could not complete your request because of a program error. Getting error message every time I open the program and try to do anything. Have to Force Quit to close. Using a Mac. Your expertise is appreciated!!

    Have you tried removing all 3rd party plug-ins?
    Also, resetting preferences to defaults may help...  Press and hold Command - Shift - Option immediately upon cold-starting Photoshop. If you get the keys down quickly enough - and you have to be really quick - it will prompt you to confirm deletion of your current preferences, which will lead to the establishment of a fresh default set. If it does not prompt you, you haven't been quick enough to get the keys down.
    -Noel

Maybe you are looking for

  • Exchange calendar sync issues among iOS devices and Mavericks

    When I add an event to a shared Exchange calendar on my Mac in iCal, and mark it as All-Day, that designation does not appear with the event on my iOS devices. Instead, it's given a 24-hour duration from 12 to 12, so to speak. Here's the confusing pa

  • Is CEP 5.2 backwards compatible with Photoshop CC 2014 / 2014.1 ?

    Hello all ! I saw adobe just released CEP 5.2 (http://blogs.adobe.com/cssdk/2014/10/introducing-cep-5-2-now-available.html) and I was wondering if I using the new CSInterface-5.2.js in my extension would break it if it is used in Photoshop CC 2014 /

  • Javascript API feature request

    Just looking at the JS API, I notice the function: $x_Style(pNd, pStyle, pString)source: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/javascript_api.htm#CHDDBBDH Which is used to set the style for a particular element on a page.

  • Slow with Lightroom

    I have a Macbook connected to an external monitor that needs a dual link adapter -- an HP LP2475w. The monitor worked fine after I got the adapter and Lightroom was OK for awhile (1 yr) until my Lightroom functions started slowing down. Seriously. I'

  • Forms 6i Demos

    I have tried to install the Forms 6i Demos but am not having much success!! Would anyony out there be able to email me the objects supplied? In particular I would like the stndrd20.fmb/mmb/pll. Thanks in advance.