/* DESC: This script will forward incoming SMS messages to a given E-mail address. * Copyright (C) 2012 NetModule AG, Switzerland */ if (argc < 1 || strlen(argv[1]) == 0) { printf("usage: sms-to-email.are "); exit(1); } rcpt = argv[1]; while(1) { msgs = nb_sms_list(); nr_msgs = length(msgs); if (nr_msgs == 0) { sleep(10); continue; } for (i=0; i