SMTP Protocol

Mondeo

Centurion
Joined
Nov 10, 2006
Messages
128
Location
Sunny Lancashire
I'm considering building an application which will send SMS text messages from an email. For example someone could send to

+44252666783@sms.mydomain.com

I also need to recieve normal smtp email through the same connection which this application would use.

So i'm thinking something like this would work.

1. My application listens on port 25 for all incoming messages
2. When message comes in it checks for "sms" in the to address. If its there it processes the sms message
3. If not then it assumes its a normal smtp message and relays to the mail server which will listen on port 26

I understand how I want it to work, I just wondered if anyone had any experience with the SMTP protocol, is it easy to implement. All i'll need to do is read the TO: addresss and then, worst case scenario relay the orginal message on.

Thanks
 
The appropriate RFC is SMTP, however these days there is a high possibility that you will need to emulate a server running ESMTP which is more complicated.

Would it not be possible to do this the other way - have the original mail server handle all inbound e-mails and simply route any destined for the @sms.mydomain.com to your service? This way you will only need to implement the bare minimum that you need and not all the required functionality the real server implements.
In fact if the existing server has the concept of a pick up folder you could get it to drop your mails into a folder as simple text files, this wouldn't require any smtp knowledge on your part at all.
 
Back
Top