linux 下ORACLE 发Mail的怪事

本文解决了一个在使用Oracle UTL_SMTP发送邮件时遇到的ORA-29279错误,该错误与SMTP配置有关,尤其是在使用特定端口时。通过在电子邮件地址周围添加尖括号<>解决了此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用ORACLE的UTL_SMTP发邮件,在前台测试好好的,同样的语句,一进入SQLPLUS后,来发就报错:
 ORA-29279: SMTP permanent error 5.5.4
查了半天,终于在METALINK上找到,这样一篇,试一下,果然Ok,需要加<>括号。
这个看来和PORT有关系,并不是一定出现,原来也是OK的,就今天突然不行,怀疑是当有多个发送MAIL的过程同时启动,可能使用了其他非标准PORT。
  Ora-29279: Smtp Permanent Error: 501 Bad Address Syntax Ora-29279 
  Doc ID:  Note:406256.1 Type:  PROBLEM 
  Last Revision Date:  24-SEP-2007 Status:  PUBLISHED 

In this Document
  Symptoms
  Changes
  Cause
  Solution
  References

--------------------------------------------------------------------------------

Applies to: 
Oracle Server - Enterprise Edition - Version: 9.0.1.4 to 10.2.0.4
Oracle Server - Personal Edition - Version: 9.0.1 to 10.2.0.3
This problem can occur on any platform.
This problem is generic . It is related to SMTP configuration rather than Database.

This is applicable to any database version. 
Symptoms
On 9.x to 10.x  :

- Using a stored procedure(s) that uses SMTP to send e-mail.
- When using the port 25 it works fine.
- From Linux, using the port 1025 to send e-mail is successful.
- When using another valid SMTP port, the following error is received :

     ORA-29279: SMTP permanent error: 501 Bad address syntax
     
Changes
The problem is a configuration issue at the SMTP level. 
Cause
The SMTP is looking for 
<> in the address. 
Usually e-mail addresses are sent as joe@oracle.com (without brackets), but in this case, SMTP is expecting the angled brackets.

 i.e. 
<joe@oracle.com>

Solution
Change the SMTP configuration to eliminate the looking for 
<> in the address or modify the code to add the angled brackets before and after the e-mail address.

This issue is not an Oracle issue but one specific to the configuration of the SMTP Server.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值