SQL Mail
Contact info
sql-mail@afna.info |
Introduction
SQL mail is intended for (SQL) developers and system administrators, who would like to send SQL database contents by email message. Program is able to connect to any SQL database, read contents and send data by e-mail as inline content or Microsoft Excel attachment. Usage is simple but also very flexible.
For program to work you have to:
1) define database connection
2) define SQL query which should be executed on target database. Based on result set of database query e-mails are sent.
Description
SQL connections
Panel shows available connections to various SQL databases.
Test SQL database connection. | |
SQL ID | ID of SQL DB connection. This ID can be also used if we call program from CMD |
Server | SQL server address |
Port | SQL server port |
DB | SQL server database name |
Username | SQL server user name |
Password | SQL server password |
SQL provider | The following SQL servers are supported: |
SQL sel. | SQL select to be executed after database connection is established. SQL query must return standardized column names. Column names that should be returned are described bellow select c_id = 'unique_id' ,c_to = 'receiver@gmail.com' ,c_from = 'sender@gmail.com' ,c_subject = 'mail subject' ,c_message = 'txt body' ,c_message_html = 'or html body' ,c_file_1 = 'export file location' ,c_file_1_sql = 'select * from table' ,c_file_1_sql_inline = 'T' ,c_file_1_sql_excel = 'T' ,c_file_1_sql_excel_header = 'Excel header'+char(13)+char(13) ,c_file_1_sql_excel_footer = +char(13)++char(13)+'Excel footer' ,n_file_1_sql_inline_count = 5 from table_name |
SQL start | SQL is executed after database connection is made. |
SQL. upd. | SQL is executed after every row from SQL sel. is processed update table_name set send_time = getdate() where c_id = :c_id |
SQL end | SQL is executed after all rows from SQL sel. are processed |
SQL Err. | SQL is executed in case of an error. Variable :c_error hold the info about the error update table_name set c_error = :c_error where c_id = :c_id |
Usage
1) Click connect
2) Click process queue
Download