Java mail and jsp -HELP!! HELP!!

Hi all
I have a simple email module with a jsp page and a html page I am trying to connect to a yahoo smtp server and send a mail from the webpage to the smtp server - I am getting an Authentication required error.
error ##
org.apache.jasper.JasperException: Sending failed;
nested exception is:
     class javax.mail.MessagingException: 530 authentication required - for help go to http://help.yahoo.com/help/us/sbc/dsl/mail/pop/pop-11.html
Can anyonne tell me how to use a simple smtp email facility
how to use an authenticator in the jsp
ciao
laodingdockjavaguy

It's required that you authentificate yourself at the smpt server
The following snipplet sends a msg using the smtp protocol.
Transport tr = session.getTransport("smtp");
tr.connect(smtphost, username, password);
msg.saveChanges();     // don't forget this
tr.sendMessage(msg, msg.getAllRecipients());
tr.close();If this still fails You can also try to set the property mail.smtp.auth to true.
mail.smtp.auth      boolean      If true, attempt to authenticate the user using the AUTH command. Defaults to false.see also http://java.sun.com/products/javamail/1.3/docs/javadocs/com/sun/mail/smtp/package-summary.html
for a complete description of the properties supported by the smpt transport.
hope it helps

Similar Messages

  • Hi frnds i want to help in servlet,java bean and JSP

    hi friends i'm right now in M.SC(IT) and i want to do project in SERVLET,,JAVA BEANS and JSP ,
    so pls give me a title about that
    NOTE: I develop a project in group(2 persons there)
    my email id is : [email protected] , [email protected] , [email protected]

    You cannot pair your iPod to a cell phone, so forget about it.
    The only way you can get free WiFi is to hang out at a Denny's, a Starbucks, or a truck stop, and I don't think your parents would approve....

  • Java Mail and Java Activator

    I have problems to deploy the API's Java Mail and Java Activator
    into Oracle 8.1.5 on a NT4 server.
    When deploying the classes in the API's that has names beginning
    with "com/sun/java..." everything works fine, but when trying to
    deploy the classes starting with "javax..." I get error:
    "ORA-01031 Unsufficient privileges."
    The error occurs during the creation of the classes.
    Does someone know why?
    I have tried to unjar the jar-files, and rejar them again with
    no compression, but this does not help.
    /Lars-Eric
    null

    Hi Mark
    I wish to send email messages from stored procedure. I looked at
    the "Java Stored Procedures Developer's Guide" but I am still
    confused. I wrote a Java program (importing "javax.mail" package)
    and then I called "loadjava": it did not work
    I read this reply, but I do not understand exactly what you mean.
    I am quite new to Oracle, and there are "tons" of things which I
    do not understand.
    Would you please explain me what I have to do to send email from
    a stored procedure?
    Thanks in advance, Carlo
    email: [email protected]
    PS: Sorry for my bad English
    mark tomlinson (guest) wrote:
    : In addition to loading JavaMail as sys in the database. You
    also
    : need to load the "invocation framework" that JavaMail depends
    on
    : (there is a link on the Javasoft JavaMail site to download the
    : code).
    : When you load java code as SYS you can pass the -s and -g
    public
    : options to loadjava to make sure that public synonyms are
    created
    : and that the loaded classes are runnable by all schemas:
    null

  • Java code and jsp interaction

    Hi,
    How does one interact between java code and jsp page.That is, if the java code does say database connection, the web page should tell that the connection has been made,just like an application but this will work on the web server not in the console.Kindly let me know.
    As

    Just curious but where do these questions come from? A course you are taking or you are building something for a hobby?
    If you are building some small simple web-app it's probably quicker to embed code right onto your JSP page.
    There are various levels of abstracting your web-app separating display from logic from the model.
    The following are techniques from simple web-apps to more complicated ones.
    -Embedding script right into your JSP
    -Using beans
    -Using custom tags ( I think there are some standard ones now, struts seems to be a popular buzzword)
    -Including a servlet to handle your requests redirect, update bean content grab info form your database and forward to a JSP. (Read up on model 2 architecture.)
    To include as much detail as possible would be to write a book. Fortunately many have so I don't have to fit one in this tiny reply box.
    Hope that was somewhat useful.

  • Serving Java Servlets and JSP

    I have a small hosting company and was wondering what is required to be installed on a Win2k Server to host Java Servlets and JSP pages for a client of mine?

    Ah, so you just want to add a servlet engine to IIS5?
    Tomcat can be used as a plugin for IIS. Check out the Tomcat FAQs - somewhere in there you should find one relating to using Tomcat as an IIS plugin. They're far more comprehensive than I could ever hope to be on the matter!

  • JAVA PACKAGES and JSP

    i Have two problems one is i am designing a website which consists of a form. I am trying to write the Connectiviy and all other insert statements in seperate java packages and include them in JSP files.
    i Have two java packages one is DBUtil(having two java files both dealing with connectovity) and another one is StudentUtIl which has java files that open the connections with database connection and insert data into DB., I am having a big Problem here. How can i call the function in the other java package in the files in this java package. i have openDB()and Close() in the other Db and i want to call these functions in JAVA classes in the other package. How to include a package. Both these packages are in the same File system mounted on a Local directory

    Thank you for the reply. I am giving the code i have given the full class name . and now it is giving the following error :
    Cannot reference a non-static method connectDB() in a static context.
    I am also giving the code. Please do help me on this. i am a beginner in java.
    import java.sql.*;
    import java.util.*;
    import DButil.*;
    public class StudentManager {
    /** Creates a new instance of StudentManager */
    public StudentManager() {
    Connection conn = null;
    Statement cs = null;
    public Vector getStudent(){
    try{
    dbutil.connectDB();
    String Query = "Select St_Record, St_L_Name, St_F_Name, St_Major, St_Email_Address, St_SSN, Date, St_Company, St_Designation";
    cs = conn.createStatement();
    java.sql.ResultSet rs = cs.executeQuery(Query);
    Vector Studentvector = new Vector();
    while(rs.next()){
    Studentinfo Student = new Studentinfo();
    Student.setSt_Record(rs.getInt("St_Record"));
    Student.setSt_L_Name(rs.getString("St_L_Name"));
    Student.setSt_F_Name(rs.getString("St_F_Name"));
    Student.setSt_Major(rs.getString("St_Major"));
    Student.setSt_Email_Address(rs.getString("St_Email_Address"));
    Student.setSt_Company(rs.getString("St_Company"));
    Student.setSt_Designation(rs.getString("St_Designation"));
    Student.setDate(rs.getInt("Date"));
    Studentvector.add(Student);
    if( cs != null)
    cs.close();
    if( conn != null && !conn.isClosed())
    conn.close();
    return Studentvector;
    }catch(Exception ignore){
    return null;
    }finally {
    dbutil.closeDB();
    import java.sql.*;
    import java.util.*;
    public class dbutil {
    /** Creates a new instance of dbutil */
    public dbutil() {
    Connection conn;
    public void connectDB(){
    conn = ConnectionManager.getConnection();
    public void closeDB(){
    try{
    if(conn != null && !conn.isClosed())
    conn.close();
    }catch(Exception excep){
    The main error is occuring at the following lines connectDB() and closeDB() in the class student manager. The class dbutil is in an another package.with an another file called connectionManager which establishes the connection with DB. The dbutil has the openconnection and close connection methods. I have not yet written the insert statements in StudentManager. PLease do Help me

  • Questions about Java Servlets and JSP

    Hi,
    I'm a confident Java Programmer (and really enjoy using this language) but am very new to Java servlets and Java Server Pages.
    I have previously worked with Perl on my web projects (simple 'league' style voting pages). I read in my 'Core Java' book that I should no longer use perl or even cgi.
    I need to know more about Java servlets and Java Server Pages so I can make the switch to a 'real' programming language.
    I have a few questions:
    How should I start to learn JS and JSP?
    How applicable will the java knowlegdge I have already be?
    Are JSP common on the world wide web?
    What tools do I need to start? (I currently develop in JBuilder and have Java 1.4.1 Standard Edition)
    Is it likey my web host (and others) will support JSP?
    Thank-you very much for helping a novice get started,
    Regards,
    Paul

    Hi, Steve ...has to be frustrating! But do not despair.
    Let's suppose the servlet it's named MyServlet on package org.servlets
    WEB-INF should look:
    WEB-INF
    classes
    org
    servlets
    MyServlet.class
    web.xml
    web.xml file should have this two declarations:
    <web-app>
      <servlet>
        <servlet-name>MyServlet</servlet-name>
        <servlet-class>org.servlets.MyServlet</servlet-class>
      </servlet>
      <!-- other servlets -->
      <servlet-mapping>
        <servlet-name>MyServlet</servlet-name>
        <url-pattern>/MyServlet</url-pattern>
      </servlet-mapping>
      <!-- other servlets mappings -->
    </web-app>Now, once the container starts (Tomcat?), you should be able to see that servlet in:
    http://localhost:8080/[my-context/]MyServletAnd what my-context is? The web application context. This string should be empty if your're deploying to the root context, otherwise should the context name. In Tomcat, deploying to root context defaults to using webapps/ROOT.
    Sorry for my English, but I felt the need to answer your request. I hope it helps despite my writing.

  • Java Classes and JSP`s (urgent)

    hi, my question is:
    How can i invoke normal java classes` methods using Jsp`s for this??, is it possible??, if it is, then how do you do this, and where do you have to put the java classes in order to find them from a jsp.
    thanks

    Hi,
    You can access normal java classes in JSP pages. You have to import them in the header like this:
    <%@ page language="java" import="//your java class file with package"%>
    or if u r using java beans, then use the <usebean> tag. Put the java classes in the classes directory. Which server u r using? If it is JWS, then u have a specified classes directory, where u have to put all the class files along with their packages. Hope this will help.
    atanu.

  • Java beans and JSP - Training

    Hi
    Does Sun or some other organization conduct any good workshops on Javabeans and jsp technology - hands on training like Microsoft products usually have. - Something like "devcon" ??
    Some people from our workplace have to have some urgent training on these technologies. Thanks in advance.
    Sue

    They sure do... http://courses.coreservlets.com/
    Don't really know how much or how often they offer these courses though.. looks like the guy might be free to do something soon. But to be honest, these courses basically run through the book. If your programmers have a decent background in Java, I'd say you could just as easily get away with getting some books (Profession JSP - Wrox press is amazing). I learned JSP in about 3 days of solid cramming.

  • Java Beans and JSP Arrays

    Hi..
    I am trying to pass a 2D String array to a Java Bean and i am getting
    "java.lang.NoSuchMethodError"
    Any Ideas?
    Thanks
    Joe
    Jsp Call
    Sorts s = new Sorts();
    s.getTotal(items);
    "items[][]" is a 2 dimentional arrays and size can vary..
    Java Bean
    public class Sorts implements Serializable {
    public double getTotal(String sItems[][]){
    double aSum=0;
    for(int i=0;i<sItems[0].length;i++){
    aSum=aSum+(Double.parseDouble(sItems[1])*Double.parseDouble(sItems[2][i]));
    return aSum;

    Can someone show me how to pass a 2 Dimentional Array to a Java Bean method? obviously i am doing something wrong.
    Joe
    Hi..
    I am trying to pass a 2D String array to a Java Bean
    and i am getting
    "java.lang.NoSuchMethodError"
    Any Ideas?
    Thanks
    Joe
    Jsp Call
    Sorts s = new Sorts();
    s.getTotal(items);
    "items[][]" is a 2 dimentional arrays and size can
    vary..
    Java Bean
    public class Sorts implements Serializable {
    public double getTotal(String sItems[][]){
    double aSum=0;
    for(int i=0;i<sItems[0].length;i++){
    aSum=aSum+(Double.parseDouble(sItems[1])*Double.pars
    Double(sItems[2][i]));
    return aSum;

  • Java script and jsp

    Hello all
    I want to call javascript function without any event from a jsp code, like following
    <script>
    function add(a,b,c){ alert("hello");}
    </script>
    jdbc connection code
    while(rs.next()
    a=rs.getInt("id");
    b=rs.getInt("id2");
    c=rs.getInt("id3");
    %>
    <script> add(<%=a %>,<%=b %>,<%=c %>);</script>
    can i do like this in jsp
    please help.

    Hi,
    You can do this in case if you put the data in request attribute.
    Regards,
    Sudheer Varma.

  • Java Mailer and R12

    Gurus,
    We have an R12 instance running on Solaris. I had configured the Java mailer during
    the installation and it used to work fine. For the past few days (and am still trying
    to figure out what was changed) the behaviour of the mailer is inconsistent.
    Mailer is not sending few notification emails and even if it sends, it is not
    sent on-time. There is always a delay (of 20 mts to sometimes 2 hrs). The following
    is the ONLY piece of log available and that is from FNDCP*txt
    [Aug 17, 2007 4:06:04 PM EDT]:1187381164395:-1:-1:swafcdev1.sherwin.com:10.240.4.176:-1:-1:1:20420:SYSADMIN(0):-1:Thread[outb
    oundThreadGroup1,5,outboundThreadGroup]:10.240.4.176:39808:1187379483935:21:ERROR:[SVC-GSM-WFMLRSVC-2911-10006 : oracle.apps.
    fnd.wf.mailer.SMTPOutboundProcessor.send(Message)]:Problem encountered when sending to {[[<<my [email protected]]]} -> javax.m
    ail.MessagingException: [EOF]
    [Aug 17, 2007 4:06:04 PM EDT]:1187381164395:-1:-1:swafcdev1.sherwin.com:10.240.4.176:-1:-1:1:20420:SYSADMIN(0):-1:Thread[outb
    oundThreadGroup1,5,outboundThreadGroup]:10.240.4.176:39808:1187379483935:21:ERROR:[SVC-GSM-WFMLRSVC-2911-10006 : oracle.apps.
    fnd.wf.mailer.SMTPMessageHandler.sendMessages(String)]:MessagingException -> javax.mail.MessagingException: [EOF]
    SMTP and IMAP servers are good.
    Any clues to debug this?
    Thanks,
    Arun

    i used the following in 11i to check the Schedule of notification mailer and when it runs
    1. Go into the responsibility: Workflow Administrator Web Applications.
    2. Navigate to Workflow Manager
    3. Click on Notification Mailer> Select the Workflow Mailer> Click on Edit
    Click on Next button until the Schedule Events section is open.
    check the when it run for me it used to runs onece each 10 min and i changed it to run onces each/day it was my busines requermtns
    i am not sure if it the same in R12
    fadi

  • Having Trouble with Java Mail and Servlets

    How can I send and receive mails using Java Mail API and Servlets

    You should familiarize yourself with the JavaMail API and the servlet API--this is much too broad a question to properly answer in a forum. The J2EE Tutorial shows how to send a mail message using JavaMail from a session bean, but the technique is similar to what you would use from a servlet:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Resources5.html#wp82097
    I'm sure the JavaMail documentation has an example as well.
    -Ian Evans

  • Are Oracle Java Serlet and JSP samples working in Oracle9i?

    Oracle web site provides many good Servlet and JSP samples. All
    the instructions talk about Oracle8i. Does anybody know for sure
    they are working under Oracle9i or not?
    Thanks!
    H.

    OTN has sample applications that demonstrate a range of JSP techniques, from basic to advanced. OTN provides two versions of the samples: one version is built to the Servlet 2.0 specification and runs under Oracle9iAS-JServ or JDeveloper, the other verion is built to the Servlet 2.2 specification and runs under the Oracle Servlet Engine (OSE) built into the Oracle8i database or the mod_ose module of Oracle9iAS.
    Regards,
    -rh

  • Java inheritance and interface code help required

    please help me I need your 30 mins only,,, working on assignment and I am trying to understand interface and inheritance might not need even 30 mins, please add me on skype *[deleted by moderator]*
    Or add me on
    yahoo msgr *[deleted by moderator]*
    waiting for your help.
    I have no single person friend or I can ask help from who knows java or programming. pretty much want to learn need a friend who can guide me in java.
    unfortunately have to submit assignment tomorrow.
    Thank you in advance for your time and consideration.
    Akee
    *Edited by moderator: EJP on 10/11/2012 10:38: removed your private contact details. This is a public forum, not a personal help desk. Ask your questions here or not at all.*

    Hi,
    there are lot of thread alredy posted please serach
    check following link
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/1d753cab14a909e10000000a11405a/frameset.htm
    XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    Links of blogs on java mapping...
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    blog
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping(file to xslt mapping)
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners(xslt with java enhancement function)
    Regards,
    Amit

Maybe you are looking for