Urgent ::: Sending java mail from AbstractPortalComponent

Hi all,
   I am using WAS SP9 (with EP & KM). I am connecting to corporate exchange server and i am sending mails and i have permission to relay from my server also. The code i used is working fine in webdynpro and also in simple java file but its not working in Abstract Portal Component. Following is the code snippet....
boolean sessionDebug = false;
Properties props = System.getProperties();
props.put("mail.smtp.auth","true");
props.put("mail.transport.protocol", "smtp");
Session session = Session.getDefaultInstance(props, null);//getting error in this line
session.setDebug(sessionDebug);
In the above acode I am getting PRT error when i get instance of session by session.getDefaultInstance method.
I didnt configure anything in the server(like javamail client). Help me out on this...
Thanks in Advance..
Regards
Vasu

Hi Akhilesh,
  Thanks for the info. I tried what u told. But,i still have a problem.
String host = "<host ip address>";
boolean sessionDebug = false;
Properties props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.auth","true");
props.put("mail.transport.protocol", "smtp");
Session session = Session.getDefaultInstance(props, null);   //i am getting the error in this line
session.setDebug(sessionDebug);
Any ideas please?
<b>Regards,
Sai Krishna.</b>

Similar Messages

  • Venu : Sending a mail from java proram , getting problem

    Hi ,
    please go through the below code
    Properties ps = new Properties();
    ps.put("mail.transport.protocol","smtp");
    ps.put("mail.smtp.host","172.20.76.63");
    ps.put("mail.smtp.port","25");
    Session mailSession = Session.getInstance(ps);
    Message msg = new MimeMessage(mailSession);
    try
    msg.setFrom(new InternetAddress ("Hear Sender Address"));
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse("hear Receipent Address"));
    msg.setSentDate(new Date());
    msg.setSubject("Hi From Java Class");
    msg.setText("I am sending An Email from Java class ");
    Transport.send(msg);
    catch(Exception e) { }
    by using the above code , is it just possible to send the mail
    from only pelple who are in (172.20.76.63) the domain only
    while i am trying to send other domain like yahoo , it is showing exception
    just suggest me , how to send the mail from any domain to domain

    Hey,
    With MIDP it's little bit hard to make application which connects to POP3 or IMAP server because there is no support for socket connections. But if your phone support sockets, it's not hard to
    make a simple e-mail client for j2me.
    But i've heard that it's possible to make somekind hacked socket connection for MIDP but i'm not sure will that work on actually phones.
    - fuse

  • Sending an mail from Application

    hi,
    I want to send an mail from java application. It contain some information. I have put all the information in one DVO(Data value Object)and added that DVO to an Arraylist. So now i want to send that information through mail to a single emailid. so tell me how i can achive it. Please help me

    Use the search option to the left of this text (just under the menu) and search for 'email' - you will find lots of help!

  • I can't send e-mails from my hotmail account with my Macbook

    Please help, I've noticed recently that I am unable to send e-mails from my hotmail account from my Macbook. I was able to send e-mails today from work (non-macbook). It's getting stressful as I have no idea what to do!

    We took our MacBook Pro to the  apple store, after a long trial and error, they FIXED the  problem!
    It turns out that one of the files was corrupt, it was either Java or Silverlight.
    My suggestion to you is to remove Java than restart and then reinstall Java. See if hotmail works. If not, than, remove Silverlight reboot than reinstall Silverlight.
    For us, it was one of those two files that were corrupt and that was causing hotmail to not be able to send email.
    I'm not sure what the procedure is to remove and reinstall files, all I know is that my wives MacBook can now send email using hotmail.
    Hope this helps.
    Stephen

  • Sending a mail from a handheld device.

    Hi!
    What are the standard methods to send a mail from a hand held device using J2ME? I managed to do it by setting up a Java Web Server running a servlet which sends out a mail, if you provide it with the mail body and the e-mail address. I called this servlet from the MIDlet, and it works fine from the J2MEWTK.
    Also, i want to know whether this would work when we port this onto an actual device? And where would the servlet run then?
    Thanks & Regards!
    Akhil

    Hey,
    With MIDP it's little bit hard to make application which connects to POP3 or IMAP server because there is no support for socket connections. But if your phone support sockets, it's not hard to
    make a simple e-mail client for j2me.
    But i've heard that it's possible to make somekind hacked socket connection for MIDP but i'm not sure will that work on actually phones.
    - fuse

  • E72- Unable to send e-mail from work mailbox

    I am unable to send e-mails from my work e-mail through my E72 although it receives perfectly. I have been in contact with Nokia via e-mail for the last 2 weeks and they have sent several suggestions to solve the issue but nothing is working. I have set-up my work e-mail on my husbands Blackberry  with the same settings and can receive and send perfectly. From that I conclude there is no issue with the settings I have or my work e-mail but with
    Nokia!! The latest 'help' I have received was to download a patch but I have no idea how to do this and get it onto my phone. So far Nokia have not replied to me.
    Any suggestions how to get this to work would be greatly appreciated

    If you're using a much older firmware, updating the phone would be a good idea.  Find the Software Updates section of nokia.com and type your phone model.  If you can't do an over-the-air update, download and install either the OVI Suite or the standalone Software Updater.  This may hard reset the phone, so back up anything important with OVI Suite first.
    Ignoring firmware for now, IMAP and URL's are like apples and oranges.  If you work for a small company, the server may always be called " mail.mycompany.com", but IMAP will never use an HTTP or HTTPS prefix.  URL's are typically associated with Microsoft Exchange servers.  Within the email program, check Options -> Settings -> Mailbox settings -> Mailbox settings -> Advanced mailbox settings.  Are "Outgoing email settings" set to something like
    User authentication: Same as for incoming
    Outgoing mail server: <compare to the setting for the Incoming server name; in a small company this will likely be the same>
    Since you're getting far enough for the mail sever to reject your connection, the other settings should be fine as-is.
    It does look like an authentication issue, so I'd say you're either hitting the wrong server or there's a bad username or password in there somewhere.  If the Blackberry works with an IMAP connection, then you should be using the same server name(s), and user/password.
    If all else fails, you can always try removing and readding the mailbox completely.  Choose Menu -> Applications -> Email -> Settings -> <highlight your work account> -> Options -> Remove mailbox.  And then set it up from scratch.  I hope that helps a little!

  • Why can I not send e-mails from my e-mail account? I can receive e-mails. Not an iCloud account. It is a Bell Aliant account.

    Why can I not send e-mails from my e-mail account? I can receive e-mails. It is not an iCloud account it is a Bell Aliant account. An account I pay for.
    This is the second time in three months this has occurred. Bell Aliant suggested I contact Apple directly as the only option is to remove my e-mail account and reconfigure it. This will mean losing all my files. These files are very important as my account is a business account.
    Bell Aliant thought perhaps it is an Apple problem and that Apple may better be able to remedy the situation without me losing my e-mail files.

    Sorry ?
    An Internet email provider losses all your Mail and it's Apple's fault ??
    Did they explain how the app managed to delete all of your mail and then not even let you have access ?
    If that was the case the app should still be able to access the empty folders.
    I know there is often blame and counter blame in these situations but there are limits.
    9:50 pm      Friday; April 10, 2015
    ​  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 not send e-mails from account but can receive

    I have my e-mail account with ATT Yahoo.
    I received an account verification notice yesterday from ATT and I responded and they said I was verified.
    However after I did that I could not send e-mails from my Imac desktop but I am receiving them.
    I spend 4 and a half hours, yes 41/2 hours with both Apple Care and ATT and they could not correct the problem. Both discussions were with upper tier support personnel.
    Here are some facts that make this an odd issue:
    (1)
    I have other e-mail boxes from ATT and they can send and receive e-mails.
    (2)
    MY laptop can still send and receive e-mails from the e-mail account that is only receiving with my Imac.
    (3)
    All the settings are exactly the same and both Apple Care and ATT checked them.
    Is there anybody out there that may have an answer ?
    Both Apple Care and ATT blamed each other.
    My concern is that today I received another e-mail trying to verify my e-mail address for another e-mail address from ATT.
    I called ATT and they did not know why, I DID NOT open it up and trashed it.
    ATT has put a filter on my other e-mail accounts and hopefully that will end any problems with them.
    The account that has the issue is my main account and I cannot trust leaving it and am trying to avoid having to change it.
    Greg

    Hi Rachel, For what it will be worth, I was like a dog with a bone about this, so I decided to give it another go. I have success on both boxes. Here is what I did, I warn you now it was a lengthy process. Before you begin download all the upgrade steps from X.5.0 to X.5.6 as single stages ( for me the combo's did not work) and have them ready to use.
    1st Backup all your mail to CD/DVD not on the box. Check for any unsent mails anywhere in the box and then throw out all of the mail bits that are anywhere on the system in any folder. 2nd Install & Archive, 3rd Start up from Install DVD and check/set permissions, reboot. Enter all your ISP details to mail, see if you can send a mail to yourself. If not dump all the mail you tried and the .plists, reboot and install next update in the series, enter all details as before, try and send etc. If this fails dump again and reboot install next update etc.
    I started at X.5.1 and got to vX.5.4 before I got a result in that sys asked me if this server will do, I said yes and I got mail out. The server name was different that was offered but when all was over it showed as the correct one that it should be on port 995. I must add that I had the spinning cog wheel for quite some minutes before anything happened. I continued on this way for the rest of the updates. 1x1 until v.6 was reached. That was only on the G4, I now had to do it all again on the MacPro. This one was not so co-operative in that I had to do it twice, but now it also has Mail running. It is funny though that I had to reach X.5.4 on both machines before it came right. On the G4 I was using a retail disc and on the Intel the supplied for discs.
    Others on here may have a better and quicker way, but for me this did work. I am sure that there is a problem in either the mail app itself or the production of the Master DVD's.
    Whatever, good luck.

  • Sending a mail from oracle database

    Hi,
    I have a requirement to send a mail from oracle database.I use UTL_TCP package for this.Although my procedure is executed successfully,i dont get the mails in my inbox.Please help me to figure out a solution.
    Thanks in advance....

    Hi, you must use UTL_SMTP package for send emails, it has more performance and features for debug. You must look the next code, this is a example for send emails.
    DECLARE
    c UTL_SMTP.CONNECTION;
    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
    END;
    BEGIN
    c := UTL_SMTP.OPEN_CONNECTION('smtp-server.acme.com');
    UTL_SMTP.HELO(c, 'foo.com');
    UTL_SMTP.MAIL(c, '[email protected]');
    UTL_SMTP.RCPT(c, '[email protected]');
    UTL_SMTP.OPEN_DATA(c);
    send_header('From', '"Sender" <[email protected]>');
    send_header('To', '"Recipient" <[email protected]>');
    send_header('Subject', 'Hello');
    UTL_SMTP.WRITE_DATA(c, UTL_TCP.CRLF || 'Hello, world!');
    UTL_SMTP.CLOSE_DATA(c);
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    BEGIN
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN UTL_SMTP.TRANSIENT_ERROR OR UTL_SMTP.PERMANENT_ERROR THEN
    NULL; -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The QUIT call will raise an
    -- exception that we can ignore.
    END;
    raise_application_error(-20000,
    'Failed to send mail due to the following error: ' || sqlerrm);
    END;
    Also review the next link for get more information about the UTL_SMTP packege.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_smtp.htm#sthref15587
    Regards.

  • How do I set up my 3G to send/receive mail from MS exchange?

    How do I set up my 3G to send/receive mail from MS exchange?

    Welcome to the Apple Community.
    If you can't get your mail to work on Snow Leopard after June 30, you might want to try one of these approaches
    1. Configuring Mail in Snow Leopard
    2. Delete your mail account from Mail preferences and set it up again using the Mail Server Information.
    Some users have apparently encountered issues using this information in pre-Lion set ups (I haven't), Roger Wilmut has kindly provided instructions for those who find themselves with this problem.
    Entering iCloud email settings manually in Snow Leopard or Leopard

  • Why am I unable to send e mails from my IPhone or IPad and get message rejected from outgoing server, message placed in outbox

    Why am I unable to send e mails from my iPhone, and get message rejected by server and message put in outbox.  I have tried changing server ports but to no avail.  I am not very technically minded so any suggestions in laymans terms please.  This is a big problem as I work away frequently and need to answer e mails.  This also happens when at home and on my own wifi.

    Hey Pam3008
    The article below will give some troubleshooting steps to resolve Mail issues.
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • How to Send a Mail From the Oracle Applications.

    Hi,
    I was assigned a task to send a mail from the front end i.e., from oracle applications.
    but i have no idea.
    i am working on oracle apps R12.1.1 and 10g reports.
    First i have to create an rdf file and that rdf file i want to send as an attachment through mail from the apps.
    Any Advice will be of great help and i will follow accordingly.
    Thanks in Advance,
    Regards,
    Bharathi.S

    Hi,
    I was assigned a task to send a mail from the front end i.e., from oracle applications.
    but i have no idea.
    i am working on oracle apps R12.1.1 and 10g reports.
    First i have to create an rdf file and that rdf file i want to send as an attachment through mail from the apps.
    Any Advice will be of great help and i will follow accordingly.
    Thanks in Advance,
    Regards,
    Bharathi.S

  • When I send out mail from MS Outlook enterprise account in the office to my Mac at home they are received as "winmail.dat" files.  Even if I perform a "save as" to the correct file name the file format is still not recognized.  Why is this happening!?

    When I send out mail from MS Outlook enterprise account in the office to my Mac at home they are received as "winmail.dat" files.  Even if I perform a "save as" to the correct file name the file format is still not recognized.  Why is this happening!?

    http://www.joshjacob.com/mac-development/tnef.php

  • When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does nog display my name or e mail address. This only since upgrading my iPhone5 to iOS7

    When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does not display my name or e mail address. This only since upgrading my iPhone5 to iOS7. I've checked all settings etc. anyone have a solution please?

    Rectory wrote:
    Please can someone tell me how  I can change this so when I send a mail from my phone and from the IPad that it reads from me.
    You need a separate email address but you've already ruled out that solution.

  • Send a mail from report 6i with his function "mail...."

    I have tried to send a mail from report using "File" ---> "Mail.." Function that is avaible on report, but it send a file "*.eps" that is not readble with the normal reader.....
    It is possible to send a PDF file ???
    Thank 's .....
    il vampiro

    Hello Mike,
    In Reports Builder 6i, Just change the Initial Value of the DESFORMAT System Parameter in the Object Navigator (under Data Model) to PDF, or any other format you want to mail the report in.
    Thanks,
    The Oracle Reports Team.

Maybe you are looking for

  • I tunes wipes out cd drive

    my i tunes software is wiping out my cd drive i rang my support centre and they said it is common in england. i cannot put any tunes on to my i pod as it just comes up with no cd burning device has been detected, is there any way round this.

  • How can I get a Japanese flash web page to display 100% correctly?

    I've tried everything I can think of but I can't get some of this web site's font to display correctly. Some of the flash shows in the correct, Japanese, characters, but some of it shows as code. If I log in as a different user, and set that user's I

  • What is the path and filename where the profile paths are stored?

    I currently am storing my profiles on a network drive. Due to some changes coming up in my home network I need to relocate them to a different drive and drive letter. I know there is a file in Firefox that has the locations of the profiles in it. I n

  • Deltas in generic extractor

    I am trying to have more then one field in my generic extractor as a delta and so far i can only set one field as delta in my generic extractor....can someone help me in setting more than one field as a delta in my custom generic extractor ????

  • How do I upload an edited photo on my iPhone to photostream?

    New photos that I have taken with my iOS 5 devices (iPhone and iPad) upload to Photostream without any issues.  My question is about photos that I've edited in my Camera Roll.  When I edit a photo in Camera Roll, the updated photo is not uploaded to