我这次出问题的原因是,接收端要求建立安全连接,但是10g没有对应的方法。
解决方法:
使用oracle11g(10g没有UTL_SMTP.STARTTLS方法)的UTL_SMTP.STARTTLS,加到UTL_SMTP.EHLO的下面。
代码大概是这样的
utl_smtp.ehlo(l_connection, 'xxx.xxx.com');
utl_smtp.starttls(l_connection);
参考资料
用来判断问题出处:
https://community.oracle.com/message/9342014
直接找到答案的地方(2楼)
https://community.oracle.com/message/10842431#10842431
官方文档
https://docs.oracle.com/cd/E11882_01/appdev.112/e40758/u_smtp.htm#ARPLS73117
其他资料
https://www.experts-exchange.com/articles/5915/How-to-Authenticate-to-an-SMTP-server-with-Oracle-PL-SQL.html