Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    134

    Default JSP mailing script not working

    Hello,

    We have CentOS and WHM 11 installed on the server. Along with this we have apache-tomcat-5.5.25 .

    Now one account on the server has JSP mailing script that is not working. The script is as follows:

    ====================================================
    <%@ page import="sun.net.smtp.SmtpClient, java.io.*" %>
    <%
    String from="abc@domain.com";
    String to="herman_white@yahoo.co.in";
    try{
    SmtpClient client = new SmtpClient("mail.domain.com");
    client.from(from);
    client.to(to);
    PrintStream message = client.startMessage();
    message.println("To: " + to);
    message.println("Subject: Sending email from JSP!");
    message.println("This was sent from a JSP page!");
    message.println();
    message.println("Cool beans! :-)");
    message.println();
    message.println();
    client.closeServer();
    }
    catch (IOException e){
    System.out.println("ERROR SENDING EMAIL:"+e);
    }
    %>
    =====================================================

    Now when the mail is send in the mail logs i get the following error message:

    56068 is currently not permitted to relay through this server. Perhaps you have not logged into the pop/imap server in the last 30 minutes or do not have SMTP Authentication turned on in your email client.

    So please give us the solution for this issue.

    Waiting for the replies.

    its_joe

  2. #2
    Member
    Join Date
    Feb 2007
    Posts
    20

    Default

    That means SMTP Authentication is required to send mail via mail.domain.com.
    The following link has an example of how to perform SMTP Authentication in JAVA:
    http://forums.ngasi.com/phpbb/viewto...highlight=smtp

    NGASI AppServer Manager
    Private JVM Java Hosting Addon
    http://www.ngasi.com

Similar Threads & Tags
Similar threads

  1. jsp not working in subdirectories
    By its_joy in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-08-2008, 02:04 PM
  2. JSP send mail script not working.
    By mak_the_admin in forum E-mail Discussions
    Replies: 0
    Last Post: 12-17-2007, 07:59 AM
  3. jsp script issue
    By rseshan in forum cPanel Developers
    Replies: 3
    Last Post: 06-10-2007, 10:21 AM
  4. .jsp working on 8080 but not on 80
    By the_bobara in forum cPanel Developers
    Replies: 11
    Last Post: 09-19-2006, 08:46 PM
  5. JSP not working
    By mtl in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-14-2005, 05:24 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube