I'm looking at making a form for sending messages from the Internet to SMS.
My current SMS provider only allows emails to SMS, so what I would like a developer to do is modify a script like this ([url removed, login to view]) or make their own.
1) the form will send an email to [mobile_number]@[url removed, login to view]
2) the message body will contain the 160 char message
Ideally, the script will have fields/features like this ([url removed, login to view]) plus the ability to drop a large number phone numbers from a spreadsheet separated by a space/comma/new line.
This project will not take long at all!
Also, I'd like some sort of delivery confirmation script that would parse an inbox for return emails from the SMS company confirming the messages were sent.
This is what the confirmation email currently outputs:
Subject: "Your SMS to 04XXXXXXXX has been sent"
Body: "The following message has been successfully sent to 04XXXXXXXX:
Test test test
The smscompany.com Team"
I would like a report/log that confirms how many messages were sent by the form.
The confirmation emails received from the SMS company simply need to be parsed and written in an email report like:
Message: "This is a test message"
Date/time sent: 01/01/2009 12:00:00
Successfully sent: XXXX messages
Failed to send: YYYY messages
Failed numbers: 04XXXXXXXX, 04XXXXXXXX, 04XXXXXXXX
- Failed numbers are those in which no confirmation email is received within 10 minutes.
- Numbers which have failed will be removed from database for future use.
- Numbers are stored in a database which can be reused for future SMS messages
To clarify, it may be easier to do the following:
1) There are multiple columns or tables of mobile numbers, each with a different title (eg "Group 1", "Group 2" etc.)
2) User chooses to send a message to "Group 1"
3) Message delivery report details how many successful/failed messages and removes any failed numbers from all groups.
Failed numbers are those which did not receive a delivery confirmation email from the SMS company.
Update: I've just confirmed with the SMS company that there is actually an email that states if a message has failed.
This makes it easier to see if a message is successful or has failed.
The email looks like this:
Subject: "Your SMS to 61469XXXXXX could not be sent"
Body: "The following message could not be sent to 61469000000:
- The number you have provided is invalid.
- Mobile network congestion.
- HTML in the body of the email. Please ensure you are sending plaintext only.
The smscompany.com Team
Therefore a delivery report will need to:
1. Check the body of all incoming emails and group the same messages together
2. Check the subject line or body and check if the message was successful or failed
3. Output the delivery report to an email