Jenkins邮件通知报错‘failed to connect, no password specified’求助
Let's break down your problems and fix them step by step:
Core Problem Analysis
The two configuration anomalies (plaintext password display, missing "Use SMTP Authentication" option) and the failed to connect, no password specified? error are closely linked. This usually happens because the email plugin isn't properly configured to recognize SMTP credentials, or there's a UI/version compatibility glitch between Jenkins core and the Email Extension plugin.
Step-by-Step Solutions
1. Fix Missing SMTP Authentication Option & Credential Recognition
Since you're using the emailext pipeline step, focus on configuring the Extended E-mail Notification (not the basic "E-mail Notification") in Jenkins:
- Navigate to Manage Jenkins > Configure System
- Scroll down to the Extended E-mail Notification section
- If you don’t see the "Use SMTP Authentication" checkbox, your plugin/Jenkins version might integrate this logic automatically: the plugin will use authentication as long as you provide a username and valid credential for the password.
- For QQ Mail specifically, use the SMTP authorization code (not your QQ login password) as the credential, set SMTP server to
smtp.qq.com, and use port 465 (with SSL enabled) or 587 (with TLS enabled).
2. Resolve Plaintext Password Display
Never enter passwords directly into plaintext input fields—it’s insecure and often causes the plugin to fail reading credentials:
- Click the Add button next to the password field, select Secret text as the credential type
- Paste your SMTP authorization code into the "Secret" field, add a descriptive ID/name, then save the credential
- Select this newly created credential from the dropdown menu next to the password field. The password will now be masked instead of displayed as plaintext.
- If the input still shows plaintext, clear your browser cache or try a different browser—this is almost always a frontend caching issue.
3. Test the Configuration
- In the Extended E-mail Notification section, click the Test configuration button
- Enter your test email address and send a test mail. If this succeeds, your pipeline should work without the connection error.
4. Verify Plugin Compatibility
Your Jenkins version (2.235.2) and Email Extension Plugin (2.73) are from roughly the same timeframe (late 2020), but if issues persist:
- Check the plugin’s compatibility notes directly in Jenkins’ Plugin Manager to confirm recommended versions for your core. You can try updating the Email Extension Plugin to the latest compatible release, or rolling back to a more stable version if needed.
Quick Note on Your Pipeline Log
The log confirms the plugin successfully parsed your recipient email but failed to connect because it couldn’t access valid SMTP credentials. Once you configure the credential properly as outlined above, this error should disappear entirely.
内容的提问来源于stack exchange,提问作者Byte

