Designing an embedded device to send email

I inherited a project from another engineer who left the company.  It's an embedded device (home appliance) that sends email (does not receive).  It installs in any home with DSL/cable/etc.  It is programmable by the installer.  I'm trying to learn all I can about SMTP authentication and have read all the pertinent RFCs, but questions remain.

Here's the way it DID work:
It can be programmed with-
 SMTP server IP address & port
 "From:" address
 "To:" address and message body

Of course, several customers complained it wouldn't work because their server required them to log in.  The original API available to me allowed for POP login, but not SMTP AUTH.  So I added another programmable option: Username/password.  If it is programmed with a username/password, it logs onto the POP server, then sends email (simple SMTP).  If there is no user/pass programmed, it just sends mail.  That fixed it for many customers, but not all.  Some required SMTP AUTH.

So, I got the latest API update which includes functions for SMTP AUTH.  If I can help it, I don't want to add any additional programming options. So...

If they require SMTP AUTH, I'll just use the username/password program fields already provided.  But this raises the following questions -
How do I know whether they require POP login before SMTP or just SMTP AUTH?
Can I just ALWAYS log in to the POP server, then try logging into the SMTP server?  Or will I need to make those options separate and selectable/programmable?
If I can attempt both, do I need to allow for two separate Username/passwords?  How many service providers require or allow them to be different?

Also, is it OK to use the domain in the "FROM:" address as the parameter to the EHLO command?  Or should that be a separate programmable option as well?

Depending on the answers I get to this, I may have a couple additional questions for clarification before closing this topic.
LVL 1
teduncanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
carl_legereConnect With a Mentor Commented:
I just looked at all my equipment that offers sending email.  Examples- Ricoh scanner, lanier copier/scanner, hplaserjet (wants to tell you it's out of supplies) , APC ups, triplite UPS, cheap netgear home router (wants to tell you your filtering policy was broken)
 
AT BEST they offer configuration for SMTP AUTH
not that many offer that, usually expect that the environment they are installed in has some way to accomodate the device rather than the other way around.

So do you want your appliance to be better than these others?  Is it expected that the installer will be computer and server savvy.  

Example- if your product is for the IT industry in some way, you are probably safe offering SMTP AUTH
If however your product is a home consumer gadget, remember that-
installer may not be able to find a ISP mail server,
0
 
brentrussellConnect With a Mentor Commented:
Well, you will have to have seperate options for authentication. They should be able to turn authentication on and off at will. Some smtp servers may reject you if you try to throw authentication at it. The Helo or EHLO command may not always work either due to some email server not allowing relaying. You will basically have to create all the options that Outlook Express has for connection and authentication if you want to be sure that most email servers will accept your email.

Here is what I suggest you do, it will save you a lot of time...
Setup your own mail server at your office there and create your equipment to send to it from anywhere. This cuts your development time down to zilch and guess what... no more unhappy customers and no more time spent dealing with tech support issues on this.

The server could be really small if you do not expect to get a lot of email everyday. May only cost you $800 - $1,300 if it can be a small wimpy server. Will it take you 8 hours to develop all these options in your application, don't forget testing, debugging, tech support, documentation for users (And still customers may be unhappy) Might save you money to make it just use your own mail server. I bet your boss would think it was a great argument. I assume that you are using VB6 since you have answered questions on VB6... this can get scarey if you have to develop all of these options in VB6.

Hope this helps
0
 
teduncanAuthor Commented:
Sorry it's taken so long for my reply.

I dread providing all the options Outlook does - not from a programming perspective, but from a user/installer's point of view.  I want to keep this device as simple as possible.

Brent, I am a VB6 programmer, but this project is an embedded system written in C with calls into a real-time OS API.  My VB6 project communicates with and programs it.  If you're curious, the device is a network interface for a home automation/security system.

We have a mail server here at work, but the IT guys won't let me change it's settings to test various options - obviously, that would affect the whole company.  I'd toyed with the notion of enabling the email server in IIS on my on machine.  Is that difficult to set up?

Carl, thanks for the info on the other devices.  Yes, I want to make it smart - and automated and simple.

Keeping is simple is the reason behind why I ask if I can just try logging into both the POP and SMTP servers - rather than providing options to select either.  If that is safe to do, then all they need to do is enter a username/password, and I'll attempt logging in to both.  Whichever one allows me to send email - who cares? As long as it works!  For the SMTP server, my login (plain/cram/etc) will depend on the servers response to ehlo.  And if they don't provide a username/password, I'll not try to log in to anything - just connect to the SMTP server and send mail.

Do you know if there's any harm in doing this?
0
 
teduncanAuthor Commented:
Bumping this back up, hoping either Brent or Carl will answer my last question...
0
 
teduncanAuthor Commented:
Well, the project is done now.  What I did was ... if not user/password was entered, I simply try to send the mail w/o auth.  If user/password is provided, I attempt to log into the POP server, then the SMTP server with the same password.  Now, I know some unique servers require different passwords (the exception rather than the rule) - but as long as the SMTP login works, I don't care.  I only log into the POP server in case they're using POP before SMTP auth.

Beta tests ran fine - no problems.  Product was released slowly - no tech calls about it so far.  Looks like I'm gonna be OK.

Because Brent & Carl contributed equally (IMHO), I'll split points between you guys.
0
All Courses

From novice to tech pro — start learning today.