Email notification of a job fails with error in appserver log: "Unable to send email. Please check your mail configuration" or "javax.mail.MessagingException: Could not connect to SMTP host: SMTP Port: 25" Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Unable to send email. Please check your mail configuration.: javax.mail.MessagingException: Could not connect to SMTP host: SMTP, port: 25; OR com.sun.mail.smtp.SMTPSendFailedException: 530 Authentication required |
Solution:
blasadmin -s <instanceName> show email all
2. Refer to steps mentioned in the documentation to configure SMTP - Review the displayed email server and from address. If any are blank or incorrect, update them with:
blasadmin -s <instanceName> set emailconfig smtpserver <smtp Server Name>
blasadmin -s <instanceName> set emailconfig fromaddress <From Address>
Documentation:TSSA 23.2 https://docs.bmc.com/docs/display/tssa232/Configuring+a+mail+server If the settings are correct confirm that the application server(s) can communicate with the specified email server on port 25/tcp (other ports are not supported) and that the email server is configured to allow unauthenticated relaying from the application server(s). If multiple application servers/instances are in the environment please check email configuration is configured correctly on the remaining application servers as well. 3. If the App server log is showing the below error message, this means the mail server requires authentication.
com.sun.mail.smtp.SMTPSendFailedException: 530 Authentication required
TSSA version 8.9.XX does not support mail servers that require authentication. Please work with the Email/system Admin to allow the app server to relay mail through email server without requiring authentication. For TSSA Version 20.02 and above supports authentication only with SMTPS protocol. SMTP with authentication is not supported. With SMTPS, user can configure the username and password in email configuration using blasadmin and authentication will be enable by setting 'email useSecure' to 'true' as below: blasadmin -a set email username <username> blasadmin -a set email password <password> blasadmin -a set email useSecure true 4. Although the user has configured all the email setting correctly and the telnet connection from the application server to the SMTP server working fine to port 25. however, the E-mail notification of the Job fails intermittently with the below error in-app server log Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Unable to send email. Please check your mail configuration.: javax.mail.MessagingException: Could not connect to SMTP host: SMTP, port: 25; - Verify if the configured SMTP server is a load balancer, if so, the user should check the health of the underlying servers and the sendmail service is working as expected on the specified SMTP port. NOTE: - In case SMTP server uses a port different from the default (25 or 465), then configure SMTP server using blasadmin command as shown below: set EmailConfig smtpserver <SMTP-server hostname OR IP>:<custom port on which SMTP server works> For example, if SMTP server is named 'ABC-SMTP' running on custom port '4001', use below blasadmin command to configure SMTP server at appserver NSH prompt. blasadmin -a set EmailConfig smtpserver ABC-SMTP:4001 |