BPEL 11g fault policy action java class not sending email

Hi All,
I am trying to attach fault policy to my bpel process. The fault conditions are working fine but the email part from the action class is not able to send email. The code execute properly , i can't see any error message in the log but I cant access the email in my inbox.
I am able to send email from using email bpel activity and also test work flow notification from em console.
I have used both the java options for sending email like javax.mail and oracle.sdp.messaging .
JAVA CODE FOR EMAIL javax.mail
public String handleFault(IFaultRecoveryContext iFaultRecoveryContext){
//Print Fault Meta Data to Console
System.out.println("****************Fault Metadata********************************");
System.out.println("Fault policy id: " + iFaultRecoveryContext.getPolicyId());
System.out.println("Fault type: " + iFaultRecoveryContext.getType());
System.out.println("Partnerlink: " + iFaultRecoveryContext.getReferenceName());
System.out.println("Port type: " + iFaultRecoveryContext.getPortType());
System.out.println("**************************************************************");
//print all properties defined in the fault-policy file
System.out.println("Properties Set for the Fault");
//Print Fault Details to Console if it exists
System.out.println("****************Fault Details********************************");
// if(iFaultRecoveryContext instanceof BPELFaultRecoveryContextImpl)
BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
System.out.println("Fault: " + bpelCtx.getFault());
System.out.println("Activity: " + bpelCtx.getActivityName());
System.out.println("Composite Instance: " + bpelCtx.getCompositeInstanceId());
System.out.println("Composite Name: " + bpelCtx.getCompositeName());
System.out.println("***********************************************************");
try {
bpelCtx.addAuditTrailEntry("Sending Email...");
Map props = iFaultRecoveryContext.getProperties();
if (props != null && props.size() > 0) {
setFrom(getParameterValue((ArrayList)props.get("from")));
setTo(getParameterValue((ArrayList)props.get("to")));
setSubject(getParameterValue((ArrayList)props.get("subject")) + bpelCtx.getTitle());
setText(getParameterValue((ArrayList)props.get("text")) + "\n" + "BPEL Process Instance: " + bpelCtx.getInstanceId() + " needs intervention to recover from a technical exception: " + bpelCtx.getFault().getMessage() + ".\n" + "Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.\n" + "This message was automatically generated, please do not reply to it.");
setHost(getParameterValue((ArrayList)props.get("host")));
setPort(getParameterValue((ArrayList)props.get("port")));
bpelCtx.addAuditTrailEntry("to Email getFrom..."+getFrom());
bpelCtx.addAuditTrailEntry("to Email getTo..."+getTo());
bpelCtx.addAuditTrailEntry("to Email getText..."+getText());
bpelCtx.addAuditTrailEntry("to Email getHost..."+getHost());
bpelCtx.addAuditTrailEntry("to Email getPort..."+getPort());
Session mailSession = Session.getDefaultInstance(properties);
Message simpleMessage = new MimeMessage(mailSession);
bpelCtx.addAuditTrailEntry("to Email toAddresses2...");
InternetAddress fromAddress = new InternetAddress(from);
bpelCtx.addAuditTrailEntry("to Email fromAddress..."+fromAddress);
simpleMessage.setFrom(fromAddress);
String[] toAddresses = to.split(";");
if (toAddresses != null && toAddresses.length > 0)
bpelCtx.addAuditTrailEntry("to Email toAddresses3...");
InternetAddress[] toInternetAddresses =new InternetAddress[toAddresses.length];
for (int i = 0; i < toAddresses.length; i++)
bpelCtx.addAuditTrailEntry("to Email toAddresses4444..."+ toAddresses);
toInternetAddresses[i] = new InternetAddress(toAddresses[i]);
bpelCtx.addAuditTrailEntry("to Email toInternetAddresses..."+ toInternetAddresses[i]);
simpleMessage.setRecipients(RecipientType.TO,toInternetAddresses);
simpleMessage.setSubject(subject);
simpleMessage.setText(text);
Transport.send(simpleMessage);
bpelCtx.addAuditTrailEntry("After Email...");
} catch (Exception e) {
bpelCtx.addAuditTrailEntry("fault Message:" + e.getMessage());
//Custom Code to Log Fault to File/DB/JMS or send Emails etc.
return "Manual";
private String getParameterValue(ArrayList parameterList) {
String value = null;
if (parameterList != null && parameterList.size() > 0)
value = (String)parameterList.get(0);
return value;
JAVA CODE FOR EMAIL oracle.sdp.messaging 
private void sendMail(IFaultRecoveryContext iFaultRecoveryContext) {
BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
bpelCtx.addAuditTrailEntry("In sendMail...");
Map<String, Object> params = new HashMap<String, Object>();
// params.put(key, value); // if optional parameters need to be specified.
MessagingClient messagingClient;
try {
bpelCtx.addAuditTrailEntry("In sendMail111...");
messagingClient =
MessagingClientFactory.createMessagingClient(params);
Message newMessage = MessagingFactory.createMessage();
// newMessage.setContent(createEventPayload(iFaultRecoveryContext),"text/plain");
newMessage.setContent("Component Name :"+bpelCtx.getComponentName()+ "\n Instacne Id :"+bpelCtx.getComponentInstanceId()+
"\n Composite Instance Id :"+bpelCtx.getCompositeInstanceId()+ "\n Composite Name :" bpelCtx.getCompositeName()
"\n Activity name :"+bpelCtx.getActivityName() + "\n Activity Id :" bpelCtx.getActivityId() "\n ECID :" bpelCtx.getECID()
"\n Reference Name :"+bpelCtx.getReferenceName()+ "\n Title :" bpelCtx.getTitle()
"\n Fault :" + bpelCtx.getFault()+ "\n Port Name :"+bpelCtx.getPortType(), "text/plain");
bpelCtx.addAuditTrailEntry("In sendMail222...");
Address sender = MessagingFactory.createAddress(getFrom());
bpelCtx.addAuditTrailEntry("In sendMail sender..."+sender.toString());
bpelCtx.addAuditTrailEntry("from Email..."+getFrom());
String recipientsStr[] = to.split(";");
bpelCtx.addAuditTrailEntry("to Email..."+getTo());
bpelCtx.addAuditTrailEntry("In sendMail333...");
Address[] recipients = MessagingFactory.createAddress(recipientsStr);
bpelCtx.addAuditTrailEntry("In sendMail444...");
newMessage.addSender(sender);
messagingClient.registerAccessPoint(MessagingFactory.createAccessPoint(sender));
newMessage.addAllRecipients(recipients);
bpelCtx.addAuditTrailEntry("In sendMail5555...");
newMessage.getMessageInfo().setSession(MessageSessionType.INBOUND_SESSION);
newMessage.setSubject(getSubject());
bpelCtx.addAuditTrailEntry("Subject..."+getSubject());
String messageId = "";
bpelCtx.addAuditTrailEntry("In sendMail666...");
synchronized (this) {
bpelCtx.addAuditTrailEntry("In sendMail777...");
messageId = messagingClient.send(newMessage);
bpelCtx.addAuditTrailEntry("In sendMail888...");
Status[] statuses = messagingClient.getStatus(messageId);
bpelCtx.addAuditTrailEntry("In sendMail999...");
} catch (MessagingException e) {
bpelCtx.addAuditTrailEntry("inside exception email fault Message:" + e.getMessage());
//e.printStackTrace();
MESSAGES FROM SOA SERVER OUT LOG after test the bpel process:
===========================================
****************Fault?Metadata********************************
Fault?policy?id:?SimpleFaultPolicy
Fault?type:?bpel
Partnerlink:?Service1
Port?type:?{http://kacst.edu.sa/process/nstip/coPINotifyProcess}kacst_process_nstipCoPIMotifyProcess
Properties?Set?for?the?Fault
****************Fault?Details********************************
Fault:?com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
,detail=<detail>&lt;exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.&lt;/exception>
</detail>
,code=<code>env:Server</code>}
Activity:?Invoke1
Composite?Instance:?740332
Composite?Name:?TestBPELFaultPolicy
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
220 taisirsit.kacst.edu.sa ESMTP Sendmail 8.14.4+Sun/8.14.4; Fri, 12 Oct 2012 13:00:45 +0300 (AST)
DEBUG SMTP: connected to host "localhost", port: 25
EHLO taisirsit.kacst.edu.sa
250-taisirsit.kacst.edu.sa Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "EXPN", arg ""
DEBUG SMTP: Found extension "VERB", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "DELIVERBY", arg ""
DEBUG SMTP: Found extension "HELP", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<[email protected]>
250 2.1.0 <[email protected]>... Sender ok
RCPT TO:<[email protected]>
250 2.1.5 <[email protected]>... Recipient ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: [email protected]
DATA
354 Enter mail, end with "." on a line by itself
From: [email protected]
To: [email protected]
Message-ID: <[email protected].sa>
Subject: SOA EXCEPTIONInstance #890381 of BPELProcess1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Testing Email From Fault
BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
,detail=<detail>&lt;exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.&lt;/exception>
</detail>
,code=<code>env:Server</code>}
Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.
This message was automatically generated, please do not reply to it.
250 2.0.0 q9CA0j30012424 Message accepted for delivery
QUIT
221 2.0.0 taisirsit.kacst.edu.sa closing connection
Details from Instance of BPEL PROCESS :
Started invocation of operation "process" on partner "Service1".
Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Invoked handleBPELFault on custom java action class "com.kacst.fault.CustomFaultHandler".
Oct 12, 2012 10:00:45 AM Sending Email...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email getText...Testing Email From Fault BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary> ,detail=<detail>&lt;exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.&lt;/exception> </detail> ,code=<code>env:Server</code>} . Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible. This message was automatically generated, please do not reply to it.
Oct 12, 2012 10:00:45 AM to Email getHost...smtp.kacst.edu.sa
Oct 12, 2012 10:00:45 AM to Email getPort...25
Oct 12, 2012 10:00:45 AM to Email toAddresses2...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email toAddresses3...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM After Email...
Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Marked Invoke activity as "pending manual recovery".
Oct 12, 2012 10:00:45 AM Faulted while invoking operation "process" on provider "Service1".
Please suggest.
Thanks

Hi,
I got the solution. our email server is sending email to the mail accounts those are in the same domain but for different domains its not able to send the email.
you can try with the email those are created on the same email server.
Thanks
Tuku

Similar Messages

  • Is it possible to throw another Fault from Fault Policy handler Java Class?

    Hi,
    I am using SOA Suite 11g. My requirement is to catch any Fault that occurs in BPEL in the Fault Policy java handler, and then throw back another Fault (Which i want to create from the java class hander) by setting the Fault Part and other Fault details.
    I will be getting the Fault message and code etc for different kinds of faults from a .properties file.
    I tried creating a new BPELFault inside the handleFault method...
    BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl) ctx;
    QName qName = new QName("http://xmlns.oracle.com/Application1_jws/FMF_Demo/FaultHandlerDemo","GenericFault");
    BPELFault flt = new BPELFault(qName);
    flt.setFaultName(qName);
    flt.setPart("<faultPartName>","Fault Message Text...");
    bpelCtx.setFault(flt);
    The new Fault is thrown back to the BPEL process, but i am not able to get the Fault details within the catch block (for GenericFault) that i have set in the Java Handler.
    Any help regarding this is highly appreciated.
    Regards,
    Shreyas

    Has anybody come across this issue? Please help.
    Regards,
    Shreyas

  • "Java Class not found in classpath" Error in DESIGNER

    Hello All,
    I'm trying to connect in Designer using a JDBC connection to MS SQL Server 2008.  As per the instructions, I updated my jdbc.sbo file with the path to the existing two JAR files.  However, I still get the following error when I try and connect in Designer:  "Java Class not found in classpath : C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer\jdbc\Drivers\sqlsrv".  Of course, this error includes the drive path with the location to my JAR files.  Any help in resolving this nagging issue is very GREATLY appreciated.  Also, if anyone needs it I can post a copy of the jdbc.sbo file to this thread.
    Thank you,
    Pankaj

    Stratos,
    Your suggestion didn't help.  I tried to connect after restarting my machine and I still get the error.  And, I've also tried adding a connection to MS SQL Server 2005 using this JDBC driver, and that didn't help either.  Any other suggestions?  Would it help to see my "jdbc.sbo" file?  Thanks again for your and everyone else's help, and I look forward to your reply.
    Regards,
    Pankaj

  • IAS: Java Classes not found Error

    Hello,
    [oracle@Linux2005 bin]$ ORACLE_HOME=$ORACLE_HOME5
    [oracle@Linux2005 bin]$ ./rwserver.sh server=RepSRV batch=yes
    [oracle@Linux2005 bin]$ ./rwserver server=RepSRV
    REP-0133: Java Classes not found
    ====
    1) Getting a REP-0133: Java Classes not found ?
    2) How can I resolve this issue ?
    PT

    Try post your problem to "Application server" forum.
    Oracle Application Server - General

  • Example of binding an object(just a java class not an EJB) to a JNDI name

    Hi,
    I would appreciate your help if you could give me some pointers regarding where
    to find any examples which uses objects ( a java class not an EJB) to a JNDI name.
    I could get an example to work using String but it doesnt work with a java class
    object.
    Thanks a lot,
    Sunitha

    Try making the java object serializable.
    - Naresh
    "sunitha" <[email protected]> wrote:
    >
    Hi,
    I would appreciate your help if you could give me some pointers regarding
    where
    to find any examples which uses objects ( a java class not an EJB) to
    a JNDI name.
    I could get an example to work using String but it doesnt work with a
    java class
    object.
    Thanks a lot,
    Sunitha

  • Mail is not sending emails Fault says Authentification Required OUK102_402[402]

    Mail is not sending emails, Receiving OK but when sending I am getting faukt report which says Authentification required OUK102_402[402]
    Anyone able to help?

    Mail (Yosemite): Verify an account’s outgoing mail server

  • Email Activity not sending emails for one domain - 10.1.3.4 MLR#10

    I have four domains in my BPELConsole. My evey BPEL process has CatchAll block and I'm sending email notification with fault details.
    Somehow, my BPEL processes from three domains are sending emails properly but myDomain4 is not sending emails even after successful execution of Email Activity.
    1) I have compared the Email code with processes in other domain and they are similar.
    2) orabpel.bpelnotification is not logging any error for this notification.
    3) I never received any email from this domain. There was no error in logs during domain creation.
    3) I am getting following in logs that sending email was successfully executed. It received Notification ID too
    <2010-09-22 07:24:44,530> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.QueueConnectionPool::QueueConnectionPool> Fetched a queue connection from pool java:comp/env/jms/Queue/NotificationSenderQueueConnectionFactory, available connections=4
    <2010-09-22 07:24:44,534> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Start of send(type,caller,message) type = email caller = BPEL
    <2010-09-22 07:24:44,534> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Notification ID 12834c63e81c20d0:-71064af1:42b35e5dab4:-7283
    Please help/hint for any possible solution/debugging.

    sometimes i have seen emails not being sent when the async invokes takes more time than the overall completion.. And yes, we might still see successful log as emails sent. FYI - I am with 10.1.3.3.1 MLR #8.
    did you try just creating a email only process? switch off all other processes in that domain and initiate only this email process to see what happens..

  • Exchange 2013 wil NOT send email, same problem as every other exchange 2013 user, typical everything.

    I have a brand new dell server 2 netwrok cards. One WAN one LAN connected, each with its respective DNS server added to the card. In OWA the sent email shows in drafts, in outlook it shows in sent items, the user NEVER gets it, internally or externally.
    i get all mail from the internet, exactly as expected no problem, all tests show this is working everything checks out fine, server runs great, full blown domain controller with exchange 2013 added. ONLY problem after the 9th install, is still the same, exchange
    will NOT send email, everything else works perfectly event log looks great. I do see the DNS error where a DNS server on that network card is not responding crap, which is not true, internet works, al pages everything, NO firewall Bare connect while i get
    it to work. I HAVE been over the forums for the last week, tried all done all. i am an MSCE, was an MCSE instructor for 10+ years, Exchange Administrator, Exchange instructor for years, so yea, i am not some newb who has no clue, this DOES NOT WORK. it
    came at the CU1 level right out of the box, so i did not install and break it myself Microsoft is now selling this broken. Where do i go what do i do here. Like i said, every other aspect is in perfect order, Just email not sent, not showing in exchange tracking
    logs, and that DNS error on the event log, and YES i made the send connector, and the 3 setting it asks, not like that could be wrong, i mean seriously you put in very little info, any wrong entry would be obvious to even a child. SO walk me through what is
    going worng, as soon as this server sends an email, i am done building this domain, Please Help here.

     Performing Outbound SMTP Test
      The outbound SMTP test was successful.
     Additional Details
    Elapsed Time: 18739 ms. 
     Test Steps
     Attempting reverse DNS lookup for IP address xxx.xxx.xxx.148.
      The Microsoft Connectivity Analyzer successfully resolved IP address xxx.xxx.xxx.148 via reverse DNS lookup.
     Additional Details
    The Microsoft Connectivity Analyzer resolved IP address xxx.xxx.xxx.148 to host wsip-xxx.xxx.xxx.148.ri.ri.cox.net. 
    Elapsed Time: 187 ms. 
     Performing Real-Time Black Hole List (RBL) Test
      Your IP address wasn't found on any of the block lists selected.
     Additional Details
    Elapsed Time: 18453 ms. 
     Test Steps
     Checking Block List "SpamHaus Block List (SBL)"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 1050 ms. 
     Checking Block List "SpamHaus Exploits Block List (XBL)"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 27 ms. 
     Checking Block List "SpamHaus Policy Block List (PBL)"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 60 ms. 
     Checking Block List "SpamCop Block List"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 90 ms. 
     Checking Block List "NJABL.ORG Block List"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 8161 ms. 
     Checking Block List "SORBS Block List"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 119 ms. 
     Checking Block List "MSRBL Combined Block List"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 61 ms. 
     Checking Block List "UCEPROTECT Level 1 Block List"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148 wasn't found on RBL.
    Elapsed Time: 63 ms. 
     Checking Block List "AHBL Block List"
      The address isn't on the block list.
     Additional Details
    IP address xxx.xxx.xxx.148wasn't found on RBL.
    Elapsed Time: 8818 ms. 
     Performing Sender ID validation.
      Sender ID validation was performed successfully.
     Additional Details
    Elapsed Time: 97 ms. 
     Test Steps
     Attempting to find the SPF record using a DNS TEXT record query.
      The Microsoft Connectivity Analyzer wasn't able to find the SPF record.
     Additional Details
    No records were found.
    Elapsed Time: 97 ms. 

  • How to use java mail to send email to hotmail box

    how to use java mail to send email to hotmail box??
    i can send emails to other box(my company's email account) but for hotmail, the program didnt print any err or exception the recepient cant receive the mail.
    thanks

    you ust to download activation.jar and mail.jar and add them to your build path.
    i have used the googlemail smtp server to send mail the code is following:
    public void SendMail()
    Properties props = new Properties();
    props.put("mail.smtp.user", username);
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.port", port);
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.socketFactory.port", port);
    try{
         Authenticator auth = new SMTPAuthenticator(username,password);
    Session session = Session.getInstance(props, auth);
    MimeMessage msg = new MimeMessage(session);
    msg.setText(text);
    msg.setSubject(subject);
    msg.setFrom(new InternetAddress(senderEmail));
    msg.addRecipient(Message.RecipientType.TO, new InternetAddress(receiver));
    Transport.send(msg);
    }catch(Exception ex) {
         System.out.println("Error Sending:");
    System.out.println(ex.getMessage().toString());
    and this the SMTPAuthenticator Class which you will need too.
    class SMTPAuthenticator extends javax.mail.Authenticator {
         private String fUser;
         private String fPassword;
         public SMTPAuthenticator(String user, String password) {
         fUser = user;
         fPassword = password;
         public PasswordAuthentication getPasswordAuthentication() {
         return new PasswordAuthentication(fUser, fPassword);
         }

  • Coldfusion 8 Not sending email

    Coldfusion is not sending emails and is showing a java error
    in the coldfusion administrator if the "verify mail server" box is
    checked when submitting the mail settings.
    The mail settings are right (they work on our production
    server), and I can send mail from the command line on the machine
    so there are no problems with the MTA or with a firewall.
    I am running coldfusion 8 on SuSE 10 enterprise server.
    Any suggestions would be greatly appreciated.
    Thanks
    Warwick Manns

    I also have a send problem. I have been sending and receiving emails from several accounts on my new iPad2 for several weeks. Last night I accidentally left my computer on and the battery ran down-dead as a doornail. I plugged it in right away this morning. I use my iPad2 frequently from the couch. I wrote 9 emails and they didn't send. I checked everything I knew to check-passwords, account settings, turn wi-fi on an off.  I've been reading the tech sheets and Apple Help but I cannot resolve the problem. I took Apple's advice and added the account manually with password and correct settings. It is still not sending. It is a pop3 account. I've reset my router and powered the computer, router, and iPad up and down numerous times. The computer sends and receives email just fine. I turn off Outlook so as to not have two devices trying to access the server at once. I don't think it is an embarqmail (provider) problem if I can send and receive on the computer. Originally I got an error about the same IP being used by another device. I have checked the IP addresses and they are not the same. I got a new computer Windows 7 and after 2 weeks I got everything set up. I have an iCloud account but do not put my email through it.  I can't see taking the iPad to an Apple store when the iPad is the only device not working. I can send email from my iPhone 3G. This does not seem to be a computer problem. What am I missing? Thanks for any help anyone can give me.
    Message was edited by: sunseeker

  • TS3899 I still can not send email from my ipad but iPhone works on those accounts

    I still can not send email from my .mac account or a .comcast.net from my ipad. I how 2 people so far that has brought to my attention. We have exchange accounts setup on the ipads for work. I compare the settings from iPad to iPhone from my view it appears identical. I am looking at an iPad 2 and a Mini.
    I turned on and off the ipads and nothing really changed. The emails come into those accounts.
    Any suggestions?
    Thanks
    VickiHTC

    When you say you can't send...as in they never get the email?  Does the email appear to send?  Error message?  When?
    It may be more than one iPad that has a problem....

  • I can not send email from my iPad .  Have been using it for over a year, all of a sudden I can only receive email.  I have a wifi connection in my home and have a A T &T cellular data plan?

    I can not send email from my iPad .  Have been using it for over a year, all of a sudden I can only receive email.  I have a wifi connection in my home and have a A T &amp;T cellular data plan?

    I have a 1st gen iPhone that I just updated the software to 2.0.2
    Now whenever I press the mail icon it goes to the mail app for about 4 seconds, does nothing, no loading of folders, old messages, nothing.
    Then it reverts back to the home screen. Tried restarting, haven't tried restoring, thought I'd look here first.
    Anyone???

  • HT1430 Hello, email settings correct, can not send emails from the ipad,

    ****, I HAVE ENTERED ALL MY EMAIL SETTINGS CORECTLY INTO MY IPAD FROM MY EMAIL ACCOUNT ON MY PC AND I CANNOT SEND EMAILS FROM IPAD  , WHAT AM I DOING WRONG CAN YOU HELP PLEASE

    it could be one of many reasons, is it giving you a reason why it is not sending emails?
    I know you said everything is the same as your PC email settings, but I would double check, also the iPad will tend to default to IMAP, so if you are using POP3 for your email, you may need to change the settings on the mail server. For example Gmail default to POP3 and needs IMAP turning on.
    What email account are you using? Who is it with?

  • Ipad not sending email, forced to reboot for changes to apply

    Hi all
    I was asked to look at a friends two week old iPad today.
    It was set up for them last week.
    Initially the person setting it up tried to add a Gmail account but found that it would receive but not send emails (using the native email app).
    They then decided to open an outlook.com account and use that instead of the gmail account.
    This worked fine for two days but then error messages saying that the mail could not be sent started to pop up. It struck me that the speed with which the error message appeared after clicking send suggested that this was an iOS issue rather than the server rejecting anything.
    I tried to check the imap/smtp settings in the "control panel" but they were not available (read:visible) so I deleted the account and entered the settings manually.
    It still wouldn't send emails but this time it didn't throw up any error messages, instead it decided to just dump them in the outbox without notifying me that there was an issue.
    Suspecting that the issue was with the ipad rather than the outlook servers, I decided to use my own smtp server details. Initially I tried using SSL but when this too failed I switched to the unsecure version on port 25.
    It still wouldn't send anything so I eventually rebooted by holding down the power button until the power off slider appeared. On rebooting I discovered that I could now send emails.
    TBH I have no idea if using the different SMTP server will be an issue if they ever want to check their outlook.com "sent mail" on line or not but i do have some questions
    1. Why was the reboot necessary? I had closed all open, unnecessary apps by double tapping the home button Might it have been the case that manually entering the outlook.com settings would have worked (given that the ideal set up would be to use the SSL outlook servers).
    2. Is this an unresolved iOS7 problem. Google searches resulted in many owners complaining that the iOS7 upgrade had rendered their email accounts incapable of sending emails. TBH the advice given ranged from perhaps sensible to plain daft.
    3. can anyone using outlook.com as their email provider on iOS7 confirm which smtp server, port, etc they use?
    4. Are there better email apps that actually give you detailed feedback?
    i don't know when I will next get the chance to get my hands on their ipad again but I would rather that they were using the correct outgoing servers with encryption (rather than my unencrypted smtp server).
    Thanks in advance

    neilyoung1 wrote:
    For the past few days I am now having trouble sending my client emails.  I get them bounced back with a permanent error of retry time exceeded.
    This is getting fustrating now as my client is needing answers that I cant give.  She is unable to email her colleague in the USA, and I am now unable to email her on a btinternet.com address.
    Do BT engineers monitor these forums?
    -Neil
    Hi again Neil.
    Your extra info now to me means that it appears to be problem at the client end!
    I hope you don't mind me asking a few questions ....
    Is she a regular BT Broadband user with a normal BTinternet email address ? Does she use secondary email addresses ?
    Do you know if she can happily email other people ? If not - it could be an account problem which may last a few days ....
    If you don't wish to provide the complete bounce message you received, could you perhaps email me the detail (emailing me using my shortcuts). Also pehaps you could ask your client to email me via my shortcuts, and see what happens and I'll take a look at replying to see what happens.
    The user on shentel.net domain she's been trying to email, did she ever manage to send any emails initially ? It could be the destination user having a problem.
    The mods do monitor these forums, but there are a lot of posts to go through of course ......
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • Sharepoint Server 2013 not sending Email notification

    I have a Sharepoint 2013 farm that is not sending any kind of email notifications. I also have a Sharepoint 2010 farm whit the same Outgoing Email settings and it is sending emails notifications normaly.
    The SMTP service (the role) is in the same member servers of the 2013 farm, so it is reachable. The timer service is running well in both member servers of the 2013 farm. We don't have an On-premise Exchange enviroment because we use Office 365 (I cannot
    set the sharepoint servers as allowed to relay in Exchange). The 2010 farm and the 2013 farm have the same Outgoing Email settings, I don´t know why the 2013 does not send emails. It is driving me crazy!.
    How can I solve this?
    Melvintt
    MCTS, Windows Server 2008 R2: Network Infrastructure
    MCTS, Windows Server 2008 R2: Active Directory, Configuring

    What about Relay and Authentication?
    Trevor Seward, MCC
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Look.
    I think this is the correct configuration because it sends emails normaly with SharePoint 2010.
    If I configure my own email account in Outbound Security, Sharepoint 2013 sends emails but just when I login to Sharepoint, if other users login it doesn't send emails.
    Melvintt
    MCTS, Windows Server 2008 R2: Network Infrastructure
    MCTS, Windows Server 2008 R2: Active Directory, Configuring

Maybe you are looking for

  • Bridge will not Open a File in Photoshop

    Yesterday my Bridge stopped opening files. I have to go to the file folder once I know the file name and open it the old fashioned way. Anyone know if there is a secret code to get it to open files again? This morning I went to the downloads and down

  • How can I print my address book on to envelopes?

    I used to be able to print addresses from my contact list on envelopes now I can't even print the addresses in a group on one page, just their phone numbers appear.  I just changed over to icloud.  Is this the problem?

  • TS3230 Images and Videos Won't Show Up In Safari?

    Hi, I've been having some trouble recently when I browse the web using Safari on my new mid-2012 MacBook Pro. Since sometime yesterday, all images have simply stopped loading on Safari, preventing me from viewing them at all. Websites only show up as

  • IDS 6.0 Authentication LDAP problem

    Hi all, I would like to test the ids6 bundled sample "remote client login". I have installed the temp cert. and activate the SSL on the web-instance. Then, i modify the AMConfig.properties: "com.iplanet.am.server.protocol" to "https". Then, i restart

  • JDBC drivers for SQL Server 2008 and PI7.0

    HI, I have deployed the JDBC drivers (sqljdbc.jar and sqljdbc4.jar) available for the SQL Server 2008 from the microsoft website as described in the how to document for deploying and configuring JDBC and JMS adapters. I am running a JDBC to FIle(XML)