Sponsored Content
Top Forums Shell Programming and Scripting Mailx recipient from mysql database Post 302789671 by jazzyzha on Thursday 4th of April 2013 04:36:30 AM
Old 04-04-2013
Do you mean like this:

Code:
SUBJECT="TEST"
EMAIL_ADDRESS=`mysql -uroot -pabcde smsd -e "SELECT email FROM recipient"`
mysql -uroot -pabcde smsd -e "SELECT ID, SenderName, Body FROM inbox" | mailx -s "$SUBJECT" -a From:sales@acme.com "$EMAIL_ADDRESS”


output:

Code:
root@testapp:/etc# sh -x daemon_emailer.sh
+ SUBJECT=TEST
+ mysql -uroot -pabcde smsd -e SELECT email FROM recipient
+ EMAIL_ADDRESS=email
supervisor@gmail.com
marketing@gmail.com
daemon_emailer.sh: 14: Syntax error: Unterminated quoted string


Last edited by jazzyzha; 04-04-2013 at 05:42 AM..
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mailx recipient restriction

maybe a simple question, but i've looked around and not been able to find anything. is there a restriction on how many recipients can be used in a single mailx command? whether it's a numeric restriction or a size restriction (like 256k for the whole recipient parameter). thanks a lot. (6 Replies)
Discussion started by: chris32680
6 Replies

2. Shell Programming and Scripting

Mailx Recipient and Name Script

Hi To All, I have a file with email addresses, most of which have names associated with them, it looks like this: http://img230.imageshack.us/img230/8255/94731317.th.jpg I am trying to come up with a script to use mailx (or anything else really) to send an email to... (4 Replies)
Discussion started by: slicker
4 Replies

3. UNIX for Dummies Questions & Answers

Connect MySQL database from Unix

How to connect a MySQL database from unix using unix shell scripting ( people are using perl scrpt to connect the same database). I want to access a MySQL database through a shell script (4 Replies)
Discussion started by: apsprabhu
4 Replies

4. Shell Programming and Scripting

How to backup a particular Database in MYSQL?

Hi All, Thanks in Advance!! How to backup a particular Databases..through Bash script!! For example i have 6 databases; Anish linux Software Questions Rhce Google these are the databases i have from that i want to take "Anish" and "questions" database backup regularly.... (4 Replies)
Discussion started by: anishkumarv
4 Replies

5. Programming

Mailx recipient from mysql database

Dear All, Can I make Mailx to read recipient address from a mysql database? I already tried emailing with bash script: SUBJECT="TEST" export EMAIL_ADDRESS=`mysql -uroot -pabcde smsd -e "SELECT email FROM recipient"` mysql -uroot -pabcde smsd -e "SELECT ID, SenderName, Body FROM inbox" |... (2 Replies)
Discussion started by: jazzyzha
2 Replies

6. Web Development

Apache users from MySQL database

Hi team, How can I implement a users in MySQL database for Apache users, assuming that I'm using RHEL6. That is to say, how can I design this database and how let's Apache server know those user in this database. Thanks in advance.. (3 Replies)
Discussion started by: leo_ultra_leo
3 Replies
GAMMU-SMSD-MONITOR(1)						       Gammu						     GAMMU-SMSD-MONITOR(1)

NAME
gammu-smsd-monitor - Monitor state of SMS daemon for Gammu SYNOPSIS
gammu-smsd-monitor [OPTION]... DESCRIPTION
This manual page documents briefly the gammu-smsd-monitor command. gammu-smsd-monitor is a program that monitors state of Gammu SMS Daemon. It periodically displays information about phone and number of processed messages. Program accepts following options (please note that long options might be not accepted on some platforms): -h, --help Shows help. -v, --version Shows version information and compiled in features. -c, --config=file Configuration file to use, default is /etc/gammu-smsdrc, on Windows there is no default and configuration file path has to be always specified. -n, --loops=count Number of loops, by default monitor loops infinitely. -d, --delay=seconds Delay betwen polling SMSD state, default is 20 seconds. -C, --csv Print output in comma separated values format: client;phone ID;IMEI;sent;received;failed;battery;signal -l, --use-log Use logging as configured in config file. -L, --no-use-log Do not use logging as configured in config file (default). AUTHOR
Michal iha <michal@cihar.com> COPYRIGHT
2009-2012, Michal iha <michal@cihar.com> 1.31.90 February 24, 2012 GAMMU-SMSD-MONITOR(1)
All times are GMT -4. The time now is 02:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy