• 【Vegas原创】Oracle使用自带的UTL_MAIL发送邮件


    Steps to enable Mailing from Database

    1.

    sqlplus ‘/ as sysdba’

    2.

    SQL>@$ORACLE_HOME/rdbms/admin/utlmail.sql

    3.

    SQL>@$ORACLE_HOME/rdbms/admin/prvtmail.plb


    4. Set smtp_server information in init.ora or spfile.ora

    SQL>alter system set smtp_out_server = "******";

    How to send an email

    1,

    sqlplus ‘/ as sysdba’

    2,

    execute  UTL_MAIL.SEND('***@***.**','***@***.**','','','Subject','Content');

    if want to send an HTML Mail,then:

    execute  UTL_MAIL.SEND('***@***.**','***@***.**','','','Subject','Content','text/html; charset=GB2312',3);

    How to grant execute permission to Other Users

    1,

    sqlplus ‘/ as sysdba’

    2,

     grant execute on sys.UTL_MAIL to whs;

    3,Login as "whs",execute the same SQL with step2 on How to send an email Paragraph.

  • 相关阅读:
    Linux获取时间赋值给变量
    关闭windows自动锁屏
    项目管理学习笔记【三】
    项目管理学习笔记【一】
    NFS服务的配置
    vue与java对称加密aes
    Redis集群
    Redis面试题
    集合处理的编程规约
    函数式接口
  • 原文地址:https://www.cnblogs.com/amadeuslee/p/3744363.html
Copyright © 2020-2023  润新知