mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
Added a form validation check to detect typical errors like http://www.nabble.com/cannot-setup-email-account-td25727896.html
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@22378 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
6f0c7ec9a8
commit
397d45193d
1 file changed
+7
@@ -392,6 +392,13 @@ public class Mailer extends Notifier {
|
||||
return doAddressCheck(value);
|
||||
}
|
||||
|
||||
public FormValidation doCheckDefaultSuffix(@QueryParameter String value) {
|
||||
if (value.matches("@[A-Za-z0-9.\\-]+") || Util.fixEmptyAndTrim(value)==null)
|
||||
return FormValidation.ok();
|
||||
else
|
||||
return FormValidation.error("This field should be '@' followed by a domain name.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an email to the admin address
|
||||
* @throws IOException
|
||||
|
||||
Reference in new issue
Block a user