public void service(Mail mail){
  try {
    MimeMessage message=mail.getMessage();
    String serialisedMessage=getSerialisedMessage(message);
    NameValuePair[] nameValuePairs=getNameValuePairs(serialisedMessage);
    String result=httpPost(nameValuePairs);
    if (passThrough) {
      addHeader(mail,(result == null || result.length() == 0),result);
    }
 else {
      mail.setState(Mail.GHOST);
    }
  }
 catch (  javax.mail.MessagingException me) {
    log(me.getMessage());
    addHeader(mail,false,me.getMessage());
  }
catch (  IOException e) {
    log(e.getMessage());
    addHeader(mail,false,e.getMessage());
  }
}

public void service ( Mail mail ) { try { MimeMessage message = mail . getMessage ( ) ; String serialisedMessage = getSerialisedMessage ( message ) ; NameValuePair [ ] nameValuePairs = getNameValuePairs ( serialisedMessage ) ; String result = httpPost ( nameValuePairs ) ; if ( passThrough ) { addHeader ( mail , ( result == null || result . length ( ) == 0 ) , result ) ; } else { mail . setState ( Mail . GHOST ) ; } } catch ( javax . mail . MessagingException me ) { log ( me . getMessage ( ) ) ; addHeader ( mail , false , me . getMessage ( ) ) ; } catch ( IOException e ) { log ( e . getMessage ( ) ) ; addHeader ( mail , false , e . getMessage ( ) ) ; } }
takes the message , serialises it and sends it to the url
