我這次出問題的原因是,接收端要求建立安全連接,但是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