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" | mailx -s "$SUBJECT" -a From:sales@acme.com "$EMAIL_ADDRESS�
It return this error:
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