views:

131

answers:

5

I am wondering if there is a framework out there for .NET to help me with sending messages to users. I would love to be able to write all my messages to a single repository. I would then like to be able to send these messages out to a user based on preferences that they set. e.g. I would like to be able to send a Notification A out to user A via email and text message and send Notification B to user B via SMS and IM. Any thoughts on if something like this exists or would I need to write it?

A: 

System.Net.Mail would be the namespace you're looking for to send e-mails to users. Take a look at this code example that can help point you in the right direction.

Aaron
A: 

For email have a look at SmtpClient. For Sms you have a couple of options:

  • Sign up to use a gateway via their API (most will have a simple way of invoking the SMS via email or web requests and are fairly cheap).
  • Implement your own SMS solution with a GSM Modem or mobile phone.
  • Or you could be lucky enough to be in an area where there is a free gateway you would have to investigate though.

For IM, it depends on exactly what you are referring to e.g. MSN? or actual machine-to-machine IM.

James
A: 

Many mobile providers allow you to send an email that will be converted to a short text message by using the recipients phone number as an email address, i.e. [email protected]

Specifically you can use the following:

AT&T: [10 digit mobile number]@txt.att.net 160 characters

Verizon: [10 digit mobile number]@vtext.com 140 characters

Various carriers have little quirks that you will have to watch out for, i.e. require you to add a 1 to the beginning of the number to represent the US calling code.

mwright
A: 

it is not trivial task, you need to implement all parts independently. if you use SmtpClient as recommended above you may have performance issues, or anti-spam issues, so consider having email server. For IM you can use XMPP (aka Jabber) protocol and XMPP server. It makes possible to send all kind of IMs from one place. There is very good free XMPP client lib agsXMPP and google "ejabberd" for server.

Andrey
A: 

For the email and SMS just let them supply multiple email addresses and configure messages for each one. They can supply their own mobile email address; Having to worry about the details of each mobile provider a big task, and one that isn't necessary. I'm not sure if every mobile provider has email->SMS, but if they don't and you have to 100% provide it a gateway is probably your only option.

For the IM part, there's another post asking exactly that with quite a few links. http://stackoverflow.com/questions/1672201/library-for-instant-messaging-like-libpurple-but-written-in-c

Josiah