today:
430
yesterday:
719
Total:
1,770,214

Technology

Email 보내기

admin 2019.08.20 13:24 Views : 219

 

<8/27> Email 보내기

<SMTP 25 만들기>

E-Mail 사용되기 위해서는 SMTP Server 되어야함. 일반적으로  Port #: 25,  verizon 경우에는 465, 2525 (장로님 server 2525 되어있음 )

1.      C drive에서 작업하기

C:.>window>system32>driver>ETC>service SMTP 25 후에 restrart 하여줌(장로님:2525)

2.      Command line에서 고쳐줌

dos에서 아래의 sql execute하면서 privilege 준다. (command line에서 한다.)

Enter user-name: sys as sysdba

Password: woo123

장로님의 E-mail_summary_ACL_final.txt 중에서 SQLPLUS 표시한 곳만을 copy 후에 오른쪽 마우스를 click하여 paste한다.)

 

GRANT EXECUTE ON SYS.UTL_FILE TO GRACEWORK;

GRANT EXECUTE ON UTL_FILE TO GRACEWORK;

GRANT EXECUTE ON SYS.UTL_SMTP TO GRACEWORK;

GRANT EXECUTE ON UTL_SMTP TO GRACEWORK;

 

 

 

CREATE OR REPLACE PUBLIC SYNONYM utl_smtp FOR sys.utl_smtp;

 

ALTER SYSTEM set smtp_out_server = 'relay.jangosmtp.net:2525' SCOPE = BOTH;

 

--- ALTER SYSTEM set smtp_out_server = 'localhost:25' SCOPE = BOTH;

 

 

 

 

 

    @?/rdbms/admin/utlmail.sql

    @?/rdbms/admin/prvtmail.plb

 

GRANT EXECUTE ON SYS.utl_mail TO GRACEWORK;

 

 

grant execute on UTL_TCP to GRACEWORK;

grant execute on utl_mail  to GRACEWORK;

grant execute on utl_http to GRACEWORK;

grant execute on UTL_INADDR  to GRACEWORK;

 

--revoke execute on utl_http from public;

 

grant execute on utl_mail  to GRACEWORK;

grant execute on utl_http to GRACEWORK;

 

 

-------all unassign

BEGIN

  DBMS_NETWORK_ACL_ADMIN.unassign_acl (

    acl         => 'utl_mail.xml',

    host        => '');

  COMMIT;

END;

 

/

----

---Drop ACL

BEGIN

  DBMS_NETWORK_ACL_ADMIN.drop_acl (

    acl         => 'utl_mail.xml'

   );

  COMMIT;

END;

/

 

 

 

begin

  dbms_network_acl_admin.create_acl(acl => 'utl_mail.xml',

                                    description => 'HTTP ACL Access',

                                    principal   => 'GRACEWORK',

                                    is_grant    => TRUE,

                                    privilege   => 'connect',

                                    start_date  => null,

                                    end_date    => null);

  dbms_network_acl_admin.add_privilege(acl=> 'utl_mail.xml',

                                    principal  => 'GRACEWORK',

                                    is_grant   => TRUE,

                                    privilege  => 'resolve',

                                    start_date => null,

                                    end_date   => null);

   DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (

    acl          => 'utl_mail.xml',               

    host         => '127.0.0.1',

    lower_port => 1,               

    upper_port => 10000);

 

 

    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (

    acl          => 'utl_mail.xml',               

    host         => 'localhost',

    lower_port => 1,               

    upper_port => 10000);

 

 

     DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (

    acl          => 'utl_mail.xml',               

    host         => 'relay.jangosmtp.net',

    lower_port => 1,               

    upper_port => 10000);

 

   

   commit;

 

end;

/

 

3.      Oracle Administrator에서 작업하기

Oracle Administrator>Manage Instance>Instance Setting>email: SMTP Host Address: relay.jangosmtp.net, SMTP Host Port: 25

 

 

2525

 

 

.

4.      Oracle Object Browser Procedure에서 2개의 procedures run 후에 compile

1)      PROCSEND_BATCH_EMAIL

보내는 Email 내용에 관한 모든 정보 들어 있다.

이곳과  PROCSEND_KOEMAIL  GRACE_KOEMAIL에서  보내는 곳의 email 주소를 넣는다.

2)      GRACE_KOEMAIL

Email 보내는 것의 기본이 되는 format이다.

5.       Window XP에서는 Email Server 만든다. (SMTP Server )

Window XPControl Panel administive Tool   IIS (Internet ????)> SMTP E-MAIL> . access에서 connect grant, replay에서 2개를 check

IIS (Internet ????)

 

=