]> WPIA git - gigi.git/blobdiff - util-testing/org/cacert/gigi/email/TestEmailProvider.java
upd: make email sender address fixed.
[gigi.git] / util-testing / org / cacert / gigi / email / TestEmailProvider.java
index ab1fa37bf5a0ab0e6b16c7778ea8f43101a38ab9..eb5eb820d795c8e21e10030404a0ce9d8def203c 100644 (file)
@@ -33,10 +33,10 @@ public class TestEmailProvider extends DelegateMailProvider {
     }
 
     @Override
-    public synchronized void sendMail(String to, String subject, String message, String from, String replyto, String toname, String fromname, String errorsto, boolean extra) throws IOException {
+    public synchronized void sendMail(String to, String subject, String message, String replyto, String toname, String fromname, String errorsto, boolean extra) throws IOException {
         while (true) {
-            if ( !assureLocalConnection() && getTarget() != null) {
-                super.sendMail(to, subject, message, from, replyto, toname, fromname, errorsto, extra);
+            if ( !ensureLocalConnection() && getTarget() != null) {
+                super.sendMail(to, subject, message, replyto, toname, fromname, errorsto, extra);
                 return;
             }
             try {
@@ -47,7 +47,6 @@ public class TestEmailProvider extends DelegateMailProvider {
                 write(to);
                 write(subject);
                 write(message);
-                write(from);
                 write(replyto);
                 out.flush();
                 return;
@@ -57,7 +56,7 @@ public class TestEmailProvider extends DelegateMailProvider {
         }
     }
 
-    private boolean assureLocalConnection() throws IOException {
+    private boolean ensureLocalConnection() throws IOException {
         if (out != null) {
             try {
                 out.writeUTF("ping");
@@ -81,7 +80,7 @@ public class TestEmailProvider extends DelegateMailProvider {
     @Override
     public synchronized String checkEmailServer(int forUid, String address) throws IOException {
         while (true) {
-            if ( !assureLocalConnection() && getTarget() != null) {
+            if ( !ensureLocalConnection() && getTarget() != null) {
                 return super.checkEmailServer(forUid, address);
             }
             try {