code: protected void sendMail(FaxJob faxJob,Connection<MailResourcesHolder> mailConnection,Message message)
      {
          if(message==null)
          {
              this.throwUnsupportedException();
          }
          else
          {
              //get holder
              MailResourcesHolder mailResourcesHolder=mailConnection.getResource();
  
              //get transport
              Transport transport=mailResourcesHolder.getTransport();
              
              try
              {
                  //send message
                  message.saveChanges();
                  if(transport==null)
                  {
                      Transport.send(message,message.getAllRecipients());
                  }
                  else
                  {
                      transport.sendMessage(message,message.getAllRecipients());
                  }
              }
              catch(Throwable throwable)
              {
                  throw new FaxException("Unable to send message.",throwable);
              }
              finally
              {
                  if(!this.usePersistentConnection)
                  {
                      try
                      {
                          //close connection
                          this.closeMailConnection(mailConnection);
                      }
                      catch(Exception exception)
                      {
                          //log error
                          Logger logger=this.getLogger();
                          logger.logInfo(new Object[]{"Error while releasing mail connection."},exception);
                      }
                  }
              }
          }
      }
docs: This function will send the mail message.
  
  @param   faxJob
  The fax job object containing the needed information
  @param   mailConnection
  The mail connection (will be released if not persistent)
  @param   message
  The message to send