Email to SMS
Our app needs to send notifications to customers’ mobiles, but we don’t have much time. Fortunately, each mobile carrier provides email-to-text service for clients having a data package. Thus, the easiest way to send an SMS message to a cell phone with a data plan would be to compose an email message and send it to the provided address.
Each carrier provides an email-to-text service in the format firstname.lastname@example.org. All we need to do is to compose an email message containing our text and send it to that email address. Most of the carriers in Canada are listed below:
- Bell/President’s Choice/Solo:
- Virgin Mobile Canada:
So how can we determine the carrier?
We can’t. In this solution, we simply send an email to ourselves while BCCing all the carriers. Only the appropriate carrier which has the recipient’s phone number will deliver the message.
Of course! In the example below, we use GMail’s SMTP service and .NET SmtpClient to send an email message.
That’s it! Simple, and sometimes useful.