SMTP sendMail 失败解决办法

时间:2022-08-13 19:43:43

If you are seeing messages like this in your message log when running a process through the process scheduler and distributing the information via email:

SMTP sendMail failed (server yourserver.com:25). Cannot send email to example@test.com
Failed to connect to the SMTP server at :25

It indicates that the SMTP settings have not been configured correctly on your process scheduler servers. What you need to do is open your process scheduler configuration file (%PS_HOME%\appserv\prcs\<PRCSDB>\psprcs.cfg) and find the following section:

[SMTP Settings];=========================================================================; Settings for SMTP mail; All controls under SMTP Settings can be dynamically changed;=========================================================================SMTPServer=SMTPPort=25SMTPServer1=SMTPPort1=0SMTPSender=PeopleSoft@peoplesoft.comSMTPSourceMachine=SMTPCharacterSet=SMTPEncodingDLL=SMTPTrace=0SMTPSendTime=0SMTPUseSSL=NSMTPSSLPort=465SMTPClientCertAlias=SMTPUseSSL1=NSMTPSSLPort1=465SMTPClientCertAlias1=

Change the following parameters:

  • SMTPServer= the fully qualified address of your SMTP server. Make sure this server is accessible from the process scheduler server.
  • SMTPPort= default SMTP port is 25. If you are planning on using SSL, consult PeopleBooks. Make sure you can reach the target port (e.g. through telnet) from your process scheduler server.
  • SMTPSender= the send address to use for emails, e.g.
  • SMTPSourceMachine= make sure you set this to the fully qualified name of your process scheduler.

You shouldn't need a restart if you have dynamic changes enabled in your configuration. Otherwise you will need a restart. There is a flag in the file psprcs.cfg that will tell you this:

[Process Scheduler]...Allow Dynamic Changes=N...