This discussion is archived
14 Replies Latest reply: Mar 25, 2013 5:17 PM by Ingenio RSS

email authentication from Reports Server to send emails usind  mail dest

Ingenio Newbie
Currently Being Moderated
Hi all.
I need to configure the reports server to send email, my email server requires authentication.
how or where to set that properties on reports server 11g?

I tried on weblogic em console >reports server> management> Basic Conf >
user = base64_encoded key
passwd = based64_encoded key

also tried wit plain text data on user and password.

have restarted services several times to test, but i still cant send.

the error form : http://192.168.1.200:8888/reports/rwservlet/showjobs?server=ReportsServer_FR_inst shows:
"Error
El informe se ha generado correctamente, pero la distribución a los siguientes destinos ha fallado."

i have:
OS> Oracle Enterprise Linux 5.5
WLS > wls 10.3.4
FR > forms reports 11.1.1.4

thankyou very much.
  • 1. Re: email authentication from Reports Server to send emails usind  mail dest
    rzuluaga - Oracle Expert
    Currently Being Moderated
    Hi Ingenio,
    check the following support note.

    Reference
    Credential Store Facility (CSF) and Oracle Reports 11g [Video] (Doc ID 1088849.1)

    Regards, Roberto
  • 2. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    Roberto,
    thank you for your fast reply.

    I just did exactly what you suggest and follow videos,

    Im able to send emails but ONLY to address *@mydomain.com, any other address is not working like *@hotmail.com *@gmail.com and rept server diagnostic tells me this error:

    [2012-09-28T11:12:27.801-06:00] [reports] [INCIDENT_ERROR] [REP-50152] [oracle.reports.server] [tid: 14] [ecid: 0000JcDrNEOF8DWFLzjO8A1GPT_y000002,0] REP-50152 : Se ha producido un error al enviar el correo: Invalid Addresses. [[
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
         at oracle.reports.utility.Utility.newRWException(Utility.java:1053)
         at oracle.reports.server.MailService.send(MailService.java:588)
         at oracle.reports.server.DesMail.sendFile(DesMail.java:186)
         at oracle.reports.server.Destination.send(Destination.java:583)
         at oracle.reports.server.JobObject.distribute(JobObject.java:2041)
         at oracle.reports.server.JobManager.updateJobStatus(JobManager.java:2761)
         at oracle.reports.server.EngineCommImpl.updateEngineJobStatus(EngineCommImpl.java:154)
         at oracle.reports.server.EngineCommPOA._invoke(EngineCommPOA.java:94)
         at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:637)
         at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:189)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1682)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1540)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:922)
         at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
         at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
         at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1213)
         at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:471)
         at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:500)

    ]]



    P.D. I know that authentication by telnet uses EHLO instead of HELO.
    please help me to resolve this .
  • 3. Re: email authentication from Reports Server to send emails usind  mail dest
    rzuluaga - Oracle Expert
    Currently Being Moderated
    Hi,
    try the following standalone mail java program using your SMTP server with authentication and try to send an email to hotmail or gmail. If that does not work then issue is something with your email server configuration.

    example

    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;

    public class MailSend{
    //// ----------- New lines
    public class MyAuthenticator extends Authenticator{
    public PasswordAuthentication getPasswordAutentication(){
    // provide your network connection info
    return new PasswordAuthentication( "uasename","password");
    }
    }
    //// -----------
    public MailSend(){
    try{
    String smtphost ="smtpapacgc.oracle.com";
    String from = "harish.petkar@oracle.com";
    String to = "harish.petkar@oracle.com";
    //start a session with debug option ,
    //setDebug(true)on the Session object cause
    //debug information to be printed to the console.
    Properties prop = System.getProperties();
    MyAuthenticator auth = new MyAuthenticator (); // new line added
    prop.put("mail.smtp.host",smtphost);
    prop.put("mail.smtp.auth","true");//new line added .
    //Session session1 = Session.getInstance(prop,null); newly commented
    Session session1 = Session.getInstance(prop,auth); // new line added
    session1.setDebug(true);
    // construct a message
    MimeMessage msg = new MimeMessage(session1);
    msg.setFrom(new InternetAddress(from));
    msg.addRecipient(Message.RecipientType.TO,new InternetAddress(to));
    msg.setSubject("from java programe");
    msg.setText("This is a test mail send from "+from+" to test his java email
    code");
    // connect to the transport
    Transport trans = session1.getTransport("smtp");
    trans.connect(smtphost,"kalyang","kalgha84042");
    // send the message
    trans.sendMessage(msg,msg.getAllRecipients());
    //smtphost
    trans.close();
    }catch(Exception e){
    e.printStackTrace();
    }
    }// Constructor
    public static void main(String[] s){
    MailSend ms = new MailSend();
    }
    }

    Ragards, Roberto
  • 4. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    Roberto, I dont know about "how to" that king of java process.

    but i can tell you that I have successfully send email to any address usind this plsql code:

    l_connection := utl_smtp.open_connection( p_smtp_hostname, p_smtp_portnum);
    utl_smtp.ehlo( l_connection, p_smtp_hostname );
    utl_smtp.command(l_connection,'AUTH LOGIN');
    utl_smtp.command(l_connection,'Y3JlYWZhbDI='); --base64 encoded username       
    utl_smtp.command(l_connection,'YmZiMTEyODVBYmk='); --base64 encoded password
    utl_smtp.mail(l_connection, p_sender);
    utl_smtp.rcpt(l_connection, p_recipient);

    "that's a litle part of the code, but the most important"

    please confirm that this is a prove that mail server works correctly.

    Thanks for your valuable help!
  • 5. Re: email authentication from Reports Server to send emails usind  mail dest
    rzuluaga - Oracle Expert
    Currently Being Moderated
    Hi,
    unfortunately that plsql code wont prove that. Reports Server uses a similar Java code as the one in the java example so that test will be more accurate.

    Regards, Roberto
  • 6. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    Ok tell me please, how to run that?
  • 7. Re: email authentication from Reports Server to send emails usind  mail dest
    rzuluaga - Oracle Expert
    Currently Being Moderated
    ok.

    1- Create a text file with the above java code and call it MailSend.java

    2- Change the values in that java code to the ones you need, smtp server, user password, from to, etc

    3- Set CLASSPATH env variable to include the directory where you have MailSend.java file

    4- Set PATH to include ORACLE_HOME/jdk/bin

    5- compile the java program
    javac MailSend.java

    6- Run the program
    java MailSend

    See what happens

    Roberto
  • 8. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    Roberto,
    I have tested and email was sent, so, as you said before, mail server is ok. tell me if you want to verify the settings i have done over the csf on enterprise manager.


    DEBUG SMTP RCVD: servername ESMTP Exim 4.77 #2 Fri, 28 Sep
    2012 14:29:58 -0600
    220- We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.

    DEBUG: SMTPTransport connected to host "mail.smtp", port: 25

    DEBUG SMTP SENT: EHLO pc-bf
    DEBUG SMTP RCVD: 250-servername Hello pc-bf [ip.ip.ip.ip
    250-SIZE 52428800
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-HELP
    250 STARTTLS

    DEBUG SMTP Found extension "SIZE", arg "52428800"
    DEBUG SMTP Found extension "PIPELINING", arg ""
    DEBUG SMTP Found extension "AUTH", arg "PLAIN LOGIN"
    DEBUG SMTP Found extension "HELP", arg ""
    DEBUG SMTP Found extension "STARTTLS", arg ""
    DEBUG SMTP: Attempt to authenticate
    DEBUG SMTP SENT: AUTH LOGIN
    DEBUG SMTP RCVD: 334 VXNlcm5hbW6

    DEBUG SMTP SENT: Y3JlYWZhbDI=
    DEBUG SMTP RCVD: 334 UGFzc3dvcm6

    DEBUG SMTP SENT: YmZiMTEyODVBmk=
    DEBUG SMTP RCVD: 235 Authentication succeeded

    DEBUG SMTP: use8bit false
    DEBUG SMTP SENT: MAIL FROM:<maemail@domain>
    DEBUG SMTP RCVD: 250 OK

    DEBUG SMTP SENT: RCPT TO:<myemail@hotmail.com>
    DEBUG SMTP RCVD: 250 Accepted

    Verified Addresses
    mymail@hotmail.com
    DEBUG SMTP SENT: DATA
    DEBUG SMTP RCVD: 354 Enter message, ending with "." on a line by itself

    DEBUG SMTP SENT:
    .
    DEBUG SMTP RCVD: 250 OK id=1THhCB-000bLO-RC

    DEBUG SMTP SENT: QUIT

    C:\Dev10\jdk\bin>java MailSend
  • 9. Re: email authentication from Reports Server to send emails usind  mail dest
    rzuluaga - Oracle Expert
    Currently Being Moderated
    Good test.
    I do not think the CSF credential store is the issue as you are able to send emails to email addresses in your domain .. if there was a problem with the CSF then all requests will fail.

    By any chance do you have any other smtp server to try with Reports Server?

    Thanks, roberto
  • 10. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    yes, I have tested with another totally diferent, located in C.America ,had the same behavior (sends to emails to address in local domains).

    big problem, today i need to send critical payroll emails.

    but what should i test now?
    I appreciate your help,
    thanks!
  • 11. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    Im sorry experts!,
    but I have not fixed my problem,
    Any other suggest?>

    Thanks!
  • 12. Re: email authentication from Reports Server to send emails usind  mail dest
    rzuluaga - Oracle Expert
    Currently Being Moderated
    Hi Ingenio,
    I am not sure what is going on but I can say that the problem is not reports related as you are able to send mails when email addresses are under your domain. If the problem was a reports configuration issue then it wont work at all. My guess is that the problem is something at email server level. I know that you are able to send emails from your email client and also using the java program but still if the problem was something in reports then it wont work at all when using destype=mail.

    Is there any chance that you can get an email server without authorization to test?

    Thanks, Roberto
  • 13. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    Roberto,
    I did Test a mailserver without auth, a friend of mine did disable his email server authentication for me to test and it worked (as my email server provider before), but he needed to enable this again, so I continue with the problem.
    My mail server provider said that the problem is on my app level.

    B.
  • 14. Re: email authentication from Reports Server to send emails usind  mail dest
    Ingenio Newbie
    Currently Being Moderated
    not really resolved, Using an authenticated mail server doesnot work for me.
    thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points