WOMailDelivery Error In Code
WOMailDelivery Error In Code
- Subject: WOMailDelivery Error In Code
- From: "Jonathan Fleming" <email@hidden>
- Date: Mon, 10 Mar 2003 14:36:29 +0000
I'm trying to send email from an error page by using WOMailDelivery and I am
getting this error:
Error: java.net.SocketException
Reason: Connection reset by peer: JVM_recv in socket input stream read
Stack trace: File Line# Method Package
--------------------------------------------------------------------------------
SocketInputStream.java NA socketRead java.net
SocketInputStream.java NA read java.net
BufferedInputStream.java NA fill java.io
BufferedInputStream.java NA read java.io
TransferProtocolClient.java NA readServerResponse sun.net
SmtpClient.java NA issueCommand sun.net.smtp
SmtpClient.java NA closeServer sun.net.smtp
NetworkClient.java NA openServer sun.net
SmtpClient.java NA openServer sun.net.smtp
SmtpClient.java NA <init> sun.net.smtp
WOMailDelivery.java 191 sendEmail com.webobjects.appserver
WOMailDelivery.java 113 composePlainTextEmail com.webobjects.appserver
DirectAction.java 36 EmailFeedbackAction DirectAction *
Method.java NA invoke java.lang.reflect
WODirectAction.java 151 performActionNamed com.webobjects.appserver
WODirectActionRequestHandler.java 174 _handleRequest
com.webobjects.appserver._private
WODirectActionRequestHandler.java 307 handleRequest
com.webobjects.appserver._private
WOApplication.java 1133 dispatchRequest com.webobjects.appserver
WOWorkerThread.java 158 runOnce com.webobjects.appserver._private
WOWorkerThread.java 231 run com.webobjects.appserver._private
Thread.java NA run java.lang
--------------------------------------------------------------------------------
NA : Non applicable, JIT activated
* this is the only highlighted link (DirectAction.java 36
EmailFeedbackAction DirectAction) and it takes me to this statement:
sharedInstance.composePlainTextEmail(from, to, null, subject, content,
true);
This is the full code of the DirectAction Class:
import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
public class DirectAction extends WODirectAction {
protected static NSArray to = new
NSArray("email@hidden");
protected String from;
protected String subject;
protected String content;
public DirectAction(WORequest aRequest) {
super(aRequest);
}
public WOActionResults defaultAction() {
return pageWithName("Main");
}
public WOActionResults EmailFeedbackAction() {
WOComponent nextPage = pageWithName ("ThankYou");
String from = request().stringFormValueForKey("from");
String subject = request().stringFormValueForKey("subject");
String content = request().stringFormValueForKey("content");
// set values
nextPage.takeValueForKey( from, "from" );
nextPage.takeValueForKey( subject, "subject" );
nextPage.takeValueForKey( content, "content" );
WOMailDelivery sharedInstance = WOMailDelivery.sharedInstance();
// send emails
sharedInstance.composePlainTextEmail(from, to, null, subject,
content, true);
// log
logString("DirectAction: email sent from: " + from);
return nextPage;
}
}
Can anyone help as to whare I'm going wrong?
Kind regards
Jonathan
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://messenger.msn.co.uk
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.