-
configuration of SMTP with Webshpere application server community server
Hi,
We are facing some problem in configuration of SMTP with WAS CE.
Actually problem is that in our application we have java class. In this class I have defined all method related to mails.
When I m trying to run this java class or java file by using static values (i.e. from, cc, bcc, subject etc...) From eclipse 3.1 as application (by right clicking java class) then code is running perfectly and all methods executed successfully and we are able to receive this mail. In this case we are calling SENDMAIL method of the java class in main method.
When we try to call this SENDMAIL method in JSP page!! We are not able to receive mails. But code is executed perfectly and there is no exception raised.
In mail API we are providing mailserver name or IP address and on my local system I have configured SMTP.
Now here we have two cases:
1) Calling SENDMAIL mail method in public static void main () {}, It works perfectly.
public static void main(String[] args) throws Exception {
System.out.println("ENTERING psvm ");
SMHopActivity objSMHopActivity= new SMHopActivity();
int i = objSMHopActivity.sendmail("ashish@netedgecomputing.com", "arvind@netedgecomputing.com", "A query/ feedback from a visitor at your site!", "this is body...........", "body old ", "", "arvind@netedgecomputing.com" , "arvind@netedgecomputing.com" );
System.out.println("After sending mail.............");
System.out.println("EXITING psvm ");
}
2) Calling SENDMAIL in JSP page. It’s not working.
<%@ page language="java" import="java.sql.*, SMH.*" errorPage="include/SMHerrorPage.jsp"%>
<jsp:useBean id="query" class="SMH.SMHopActivity" >
</jsp:useBean>
<% int i=0;
System.out.println("ENTERING psvm ");
SMHopActivity objSMHopActivity= new SMHopActivity();
try
{
i = objSMHopActivity.sendmail("arvind@netedgecomputing.com", "arvind@netedgecomputing.com", "A query/ feedback from a visitor at your site!", "this is body...........", "body old ", "", "arvind@netedgecomputing.com" , "arvind@netedgecomputing.com" );
}catch(Exception e){throw new Error();}
System.out.println("After sending mail.............");
System.out.println("EXITING psvm ");
System.out.println("Finally number of Mail Transferred......"+i);
/*int rowx=query.sendmail("arvind@netedgecomputing.com", "arvind@netedgecomputing.com", "A query/ feedback from a visitor at your site!", "this is body...........", "body old ", "", "ashish@netedgecomputing.com" , "arvind@netedgecomputing.com" );*/
%>
Run this Jsp:
http://localhost:8080/smh/JSP/mail.jsp
With the same mailserver : netedgecomputing.com
SMTP Port : 25 (local system
In above two complete processing is same.
I want to know, Is there any configuration that we have to do in WASCE for SMTP and for mail API.Up till now we have not mentioned anything for SMTP in WAS CE.
I’ll provide you more information over this issue if it is not clear.
Please let me know your comments.
Similar Threads
-
By rperez in forum Database
Replies: 5
Last Post: 01-02-2009, 05:14 PM
-
By bob in forum VB Classic
Replies: 1
Last Post: 01-14-2002, 07:49 AM
-
By Naveen in forum VB Classic
Replies: 1
Last Post: 12-21-2001, 03:33 PM
-
Replies: 7
Last Post: 09-15-2000, 08:44 AM
-
By Jinbo Wang in forum Java
Replies: 0
Last Post: 03-15-2000, 06:30 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|