Sending component replacement in Oracle

Source: Internet
Author: User
Create   Or   Replace   Procedure Send_mail (
Pemail In Varchar2 ,
PPW In Varchar2 ,
PID In Varchar2
)
Is
Rochelle mailhost Varchar2 ( 64 ): =   ' IP ' ;
Rochelle from Varchar2 ( 64 ): =   'Account @ email domain name ' ;
L_subject Varchar2 ( 64 ): =   ' Title ' ;
Rochelle Varchar2 ( 64 ): = Pemail;
Rochelle mail_conn utl_smtp.connection;
Begin
-- Rochelle mail_conn: = utl_smtp.open_connection (Rochelle mailhost, 25 );
-- Utl_smtp.helo (l_mail_conn, l_mailhost );

-- Open SMTP connection
Rochelle mail_conn: = Utl_smtp.open_connection (l_mailhost, Port );
Utl_smtp.ehlo (l_mail_conn, l_mailhost );
Utl_smtp.command (l_mail_conn, ' Xxxx ' );
Utl_smtp.command
(L_mail_conn,
Utl_raw.cast_to_varchar2
(Utl_encode.base64_encode (utl_raw.cast_to_raw ( 'Xxx ' )
)
)
);
Utl_smtp.command
(L_mail_conn,
Utl_raw.cast_to_varchar2
(Utl_encode.base64_encode (utl_raw.cast_to_raw ( ' Xxxx ' )
);
utl_smtp.mail (l_mail_conn, l_from );
utl_smtp.rcpt (l_mail_conn, l_to);
utl_smtp.open_data (l_mail_conn);
utl_smtp.write_data (l_mail_conn,
' Date: '
| To_char (sysdate, ' DD-MON-YYYY hh24: MI: Ss. ' )
| CHR ( 13 )
);
Utl_smtp.write_data (l_mail_conn, ' From: '   | Rochelle from | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn, ' Subject: '   | L_subject | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn, ' To: '   | Rochelle | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn, ''   | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn, ' Dear sir '   | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn, ''   | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn,
' Your acount is created '
| PID
|   ' And password is '
| PPW
| CHR ( 13 )
);
Utl_smtp.write_data
(L_mail_conn,
' Xxxx '
| CHR ( 13 )
);
Utl_smtp.write_data
(L_mail_conn,
' Xxx '
| CHR ( 13 )
);
Utl_smtp.write_data (l_mail_conn,
' Http: // ip address to log in. '   | CHR ( 13 )
);
Utl_smtp.write_data
(L_mail_conn,
' Xxxx '
| CHR ( 13 )
);
Utl_smtp.write_data (l_mail_conn, ' What you can do. '   | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn,
' Xxx '   | CHR ( 13 )
);
Utl_smtp.write_data (l_mail_conn, ''   | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn, ' Sincerely '   | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn, '   '   | CHR ( 13 ));
Utl_smtp.write_data (l_mail_conn,
' From xxxx '   | CHR ( 13 )
);
Utl_smtp.close_data (l_mail_conn );
Utl_smtp.quit (l_mail_conn );
End ;
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.