如果你碰巧使用的甲骨文,甲骨文通過發送郵件是這樣,當你使用Citrix容易得多。郵件設置通過oracle中的utl_smtp包在服務器上進行。
CREATE OR REPLACE PROCEDURE mail
(
sender IN VARCHAR2,
recipient IN VARCHAR2,
ccrecipient IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2
) IS
connection utl_smtp.connection;
mailhost VARCHAR2(30) := 'displacedguy.com';
header VARCHAR2(1000);
BEGIN
-- Start the connection.
connection := utl_smtp.open_connection(mailhost,25);
header:= 'Date: '||TO_CHAR(SYSDATE,'dd Mon yy hh24:mi:ss')||UTL_TCP.CRLF||
'From: '||sender||''||UTL_TCP.CRLF||
'Subject: '||subject||UTL_TCP.CRLF||
'To: '||recipient||UTL_TCP.CRLF||
'CC: '||ccrecipient;
-- Handshake with the SMTP server
utl_smtp.helo(connection, mailhost);
utl_smtp.mail(connection, sender);
utl_smtp.rcpt(connection, recipient);
utl_smtp.rcpt(connection, ccrecipient);
utl_smtp.open_data(connection);
-- Write the header
utl_smtp.write_data(connection, header);
utl_smtp.write_data(connection, UTL_TCP.CRLF ||message);
utl_smtp.close_data(connection);
utl_smtp.quit(connection);
EXCEPTION
WHEN UTL_SMTP.INVALID_OPERATION THEN
dbms_output.put_line(' Invalid Operation(s) in SMTP transaction.');
WHEN UTL_SMTP.TRANSIENT_ERROR THEN
dbms_output.put_line(' Problems sending email try again later.');
WHEN UTL_SMTP.PERMANENT_ERROR THEN
dbms_output.put_line(' Error(s) in SMTP transaction.');
END;
要使用PB中創建一個通用的事務對象,如果你沒有一個已經添加RPCFUNC定義您的UTL_SMTP包,並給它一個別名友好名稱。一旦定義,您可以使用sqlca.sendmail(a,b,c,d)調用包函數;你可以把它稱爲一個函數。
這是不是一個真正的答案,但對於使用Oracle的解決方法。認爲這值得一提。
每個Citrix用戶是否已經擁有一個定義的Outlook配置文件? – 2012-01-03 12:20:20
我這麼認爲,但我不知道思傑方面。但是,我們的獨立應用程序一直向我們的客戶發送電子郵件通知,這是從PB 11.5 – 2012-01-04 11:43:18
開發的。這就是我的意思,但他們必須在Citrix服務器上有一個定義的Outlook配置文件,才能通過MAPI發送電子郵件。 – 2012-01-04 13:51:35