일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- 선택적조인
- Ajax
- 가우스
- MySQL
- tomcat
- Google Map
- jQuery
- JSON
- JDOM
- phonegap
- sencha touch
- Spring
- MFC
- ibsheet
- GPS
- jsr 296
- dock
- WebLogic
- swingx
- Struts
- Android
- 전자정부프레임워크
- iBATIS
- Eclipse
- appspresso
- PHP
- PLSQL
- node.js
- rowspan
- oracle
Archives
- Today
- Total
Where The Streets Have No Name
pl/sql에서 메일 보내기 본문
CREATE OR REPLACE procedure pr_pv_send_mail
( p_from in varchar2,
p_from_name in varchar2,
p_to in varchar2,
p_to_name in varchar2,
p_subject in varchar2,
p_body in varchar2 )
is
v_connection UTL_SMTP.CONNECTION;
mesg VARCHAR2( 6000 ) := '';
begin
--smtp setting
v_connection := UTL_SMTP.OPEN_CONNECTION('156.147.113.6',25);
UTL_SMTP.HELO(v_connection,'156.147.113.6');
UTL_SMTP.MAIL(v_connection,p_from);
UTL_SMTP.RCPT(v_connection,p_to);
UTL_SMTP.open_data(v_connection);
mesg := 'From: '|| p_from_name || '<' || p_from || '>' ||utl_tcp.CRLF;
mesg := mesg||'To: '|| p_to_name || '<'|| p_to || '>' ||utl_tcp.CRLF;
mesg := mesg||'Subject: '|| p_subject ||utl_tcp.CRLF;
mesg := mesg||'content-type: text/html;' || chr(13) || chr(10) || p_body||'';
UTL_SMTP.write_raw_data(v_connection,UTL_RAW.CAST_TO_RAW(mesg));
UTL_SMTP.close_data(v_connection);
UTL_SMTP.QUIT(v_connection);
end;
/
( p_from in varchar2,
p_from_name in varchar2,
p_to in varchar2,
p_to_name in varchar2,
p_subject in varchar2,
p_body in varchar2 )
is
v_connection UTL_SMTP.CONNECTION;
mesg VARCHAR2( 6000 ) := '';
begin
--smtp setting
v_connection := UTL_SMTP.OPEN_CONNECTION('156.147.113.6',25);
UTL_SMTP.HELO(v_connection,'156.147.113.6');
UTL_SMTP.MAIL(v_connection,p_from);
UTL_SMTP.RCPT(v_connection,p_to);
UTL_SMTP.open_data(v_connection);
mesg := 'From: '|| p_from_name || '<' || p_from || '>' ||utl_tcp.CRLF;
mesg := mesg||'To: '|| p_to_name || '<'|| p_to || '>' ||utl_tcp.CRLF;
mesg := mesg||'Subject: '|| p_subject ||utl_tcp.CRLF;
mesg := mesg||'content-type: text/html;' || chr(13) || chr(10) || p_body||'';
UTL_SMTP.write_raw_data(v_connection,UTL_RAW.CAST_TO_RAW(mesg));
UTL_SMTP.close_data(v_connection);
UTL_SMTP.QUIT(v_connection);
end;
/