Sponsored Content
Top Forums Programming Mailx recipient from mysql database Post 302789609 by jazzyzha on Thursday 4th of April 2013 02:00:33 AM
Old 04-04-2013
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:

Code:
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" | mailx -s "$SUBJECT" -a From:sales@acme.com "$EMAIL_ADDRESS”

It return this error:
Code:
export: 13: supervisor@gmail.com: bad variable name

the table has 2 row with two email address each.

but no luck. Any help would be very appriciated. Thanks

Last edited by jazzyzha; 04-04-2013 at 04:28 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. Shell Programming and Scripting

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" |... (14 Replies)
Discussion started by: jazzyzha
14 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
formmailtest(1) 					      General Commands Manual						   formmailtest(1)

NAME
formmailtest - attempt to use formmail to relay to a DSBL-complaint host SYNOPSIS
formmailtest <url> [<spoof recipient>] DESCRIPTION
formmailtest attempts to connect to the specified host and uses several different to attempt to relay through the FormMail script located at <url>. It can do more tests if the normal recipient for that FormMail script is provided as <spoof recipient>, but it can quite often relay without. Tests are done with both GET and POST to attempt to bypass any firewall/httpd.conf/.htaccess pseudo-security. In the tests described below, DOMAIN is the section of <spoof recipient> after the @ sign, USER is the section before, and DASHDOMAIN is DOMAIN after all periods have been replaced by dashes. Tests: recipient=listme@dsbl.org recipient=dsbl.org!listme realname=&email= Cc: listme@dsbl.org&recipient=() realname=) Cc: listme@dsbl.org (&recipient=() recipient=listme%dsbl.org@DOMAIN recipient=dsbl.org!listme@DOMAIN recipient=listme@dsbl.org(DOMAIN recipient=<listme@dsbl.org>DOMAIN realname=&email=0c: listme@dsbl.org&recipient=DOMAIN realname=)0c: listme@dsbl.org (&email=&recipient=DOMAIN recipient=listme@dsbl.org(USER@DASHDOMAIN recipient=<listme@dsbl.org>USER@DASHDOMAIN AUTHOR
Ian Gulliver <ian@penguinhosting.net> SEE ALSO
dsbl.conf(5), spamtrap(1) 2002-04-03 formmailtest(1)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy