How to send/receive SMS with gammu

Script for sending a message from a file:

#!/bin/bash

# $1 = telephone number

# $2 = text file
gammu sendsms text $1 -report < $2

—————

Command line for sending a message:

$ echo “message to send” | gammu sendsms text <phone number> -report

—————

With gammu smsd, by using the RunOnReceive directives, it is possible to send the received SMS to email.

Command line for sending email:

$ mail -s “subject email” <email address> < text_file

here more info:

http://raynux.com/blog/2011/04/11/send-mail-from-unixlinux-bash-shell-script/