If you want to send an email from Oracle before 10 Gb, you must use the utl_smtp and utl_tcp feature packages of Oracle to package an email sender program and then use it. since 10 Gb, this process will become very simple. because Oracle provides us with an utl_mail package,
In some scenarios we may need to generate some random data, such as generating phone numbers, e-mail addresses and other data in a test environment for functional testing. Or import the production data into the test environment for simple desensitization processing. This is what I developed on the basis of dbms_random to generate:
Mobile phone number
Phone number
Email
ID number
Bank card number
Address
An
-----------------------------------------------------
Begin
Rochelle sendoraddress: ='| P_sendor |'>';
P_splite_str (p_receiver );-- Process the email address
Forkin1.. my_address_list.countloop
P_email (l_sendoraddress, my_address_list (k ));
Endloop;
/* Process the email address and separate the email by commas */
End;
Test the performance of
Copy codeThe Code is as follows:Create or replace procedure procsendemail (P_TXT VARCHAR2,P_SUB VARCHAR2,P_SENDOR VARCHAR2,P_RECEIVER VARCHAR2,P_SERVER VARCHAR2,P_PORT number default 25,P_NEED_SMTP int default 0,P_USER VARCHAR2 default null,P_PASS VARCHAR2 default null,P_FILENAME VARCHAR2 default null,P_ENCODE VARCHAR2 DEFAULT 'bit 7 ')AUTHID CURRENT_USER IS Copy codeThe Code is as follows:/*Purpose: use oracle to send emailsMain functions: 1. Support
successfully mailed out. -- tests procedure email_notice_expired
begin
email_notice_expired;
End; After writing the procedure, it is time to set up an Oracle schedule to call this procedure to send a letter. /*Call the stored procedure get_expired_program every 5 minutes written from Milo on 20170309*/
beginSys.dbms_scheduler.create_job (job_name= 'PLOEC. Email_notice_expired_task', Job_type= 'stored_procedure', Job_action= 'email_notice_expired
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.