package net.sourceforge.fenixedu.webServices.candidacies; import java.util.Collections; import javax.servlet.ServletRequest; import net.sourceforge.fenixedu.domain.candidate.CandidateLoginRequest; import net.sourceforge.fenixedu.domain.util.Email; import net.sourceforge.fenixedu.util.HostAccessControl; import org.codehaus.xfire.transport.http.XFireServletController; import pt.ist.fenixWebFramework.services.Service; public class CandidateCreation implements ICandidateCreation { public void createCandidate(String email) { final ServletRequest servletRequest = XFireServletController.getRequest(); // if (HostAccessControl.isAllowed(getClass(), servletRequest)) { CandidateLoginRequest.newLoginRequest(email); // if (email.endsWith("@qub-it.com") || email.endsWith("@mongoose.pt")) { // sendTestEmail(email); // } // } } @Service private void sendTestEmail(String email) { new Email("From ISCTE", "ISCTE@ISCTE.pt", new String[] { "noreply@iscte.pt" }, Collections.singletonList(email), Collections.EMPTY_LIST, Collections.EMPTY_LIST, "Test subject", "test body"); } }