오라클을 사용하는 경우 Citrix를 사용하면 오라클을 통해 메일을 보내는 것이 훨씬 쉽습니다. 메일 설정은 oracle의 utl_smtp 패키지를 통해 서버에서 설정됩니다. 당신이 이미 하나를 가지고 당신의 UTL_SMTP 패키지 RPCFUNC 정의를 추가하고 그것을 별칭 친숙한 이름을 제공하지 않는 경우
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;
는 일반적인 트랜잭션 객체를 생성 파워 빌더에서 사용하십시오. 일단 정의되면 sqlca.sendmail (a, b, c, d)를 사용하여 패키지 함수를 호출 할 수 있습니다. 함수처럼 호출 할 수 있습니다.
이것은 오라클을 사용하는 사람들에게는 실제로 답이 아니라 해결 방법이 아닙니다. 언급 할만한 가치가 있다고 생각했습니다.
모든 Citrix 사용자가 이미 정의 된 Outlook 프로필을 가지고 있습니까? –
나는 그렇게 생각한다. 그러나 나는 시트릭스 측에 대해 확신하지 못한다. 그러나 우리의 독립형 애플리케이션은 PB 11.5 –
에서 개발 된 고객에게 전자 메일 알림을 전송했습니다. 그렇다고해도 MAPI를 통해 전자 메일을 보내려면 Citrix 서버에 정의 된 Outlook 프로필이 있어야합니다. –