views:

192

answers:

6

I have a program that, for the most part, operates in the background. Let's say it DoesWork(). Once a week, I want it to notify the user on some of the work it has completed over the past few days. It will be a basic status report, listing some files that have been downloaded.

Initially, I wanted to sent this status update via email, so I looked into that but there are a lot of problems. I need an SMTP server so I looked at GMail. It's okay but has a daily limit of 500 emails, so this wouldn't be suitable for release. Also, there would be issues with the same email account password being given out in each copy of the program, which as I understand it, is a risk even if the password is stored using encryption.

Then I thought maybe I could use the user's own email account to send email to his/her self. This has a couple of complications too: the user would need to specify all of the smtp information for his/her email account, which is too complicated for the target user. Also, I don't want to have to have people entering their email account password into my program just to send emails. I don't think that's a good habit to promote.

Is there any way I could do this via email? Email was my first choice because it's a system of notification that users will already be checking. It's fairly non-intrusive.

Is it necessary to setup my own smtp server? If so, how can I do that?

If email is a no-go, I was also thinking about just generating a local HTML file with the relevent information, and then having a notification popup from the program once a week to inform the user that a new update report is ready. I think this is totally doable, it's just overly instrusive and not my first choice. I want to piggyback on a system that the user is already using.

Thanks! -greg

A: 

Google for simple smtp server windows gives you this

To be honest if you are just sending things once a week email is your best bet, as it's not frequent enough to garantee that the user will be at his machine to accept some other sort of request, which would require you to write proprietory software.

You could alternatively post it to an irc channel, or write an MSN bot to message the user, the message would be sent as an offline message if the user was offline.

I'd still go for email, it's tried and tested.

Omar Kooheji
My understanding from readin on the net is that sending mail from 'localhost' will cause it to automatically be rejected by many servers (e.g. hotmail, aol mail, etc.). So I don't think that's a good solution.
greg7gkb
+2  A: 

An alternative is to have the program generate an RSS feed and direct the user how to subscribe to it. Also, once a new update is generated, show the update toast for about a minute, then hide it automatically and change your systray icon to something different. In about a day change it back to the original icon. Also, give the user a setting to turn the toast off permanently.

Relying on email is not a good idea, as you would have to collect the user emails and deal with the privacy issues for that, you would be effectively DOSing any third party SMTP server or would have to invest in the infrastructure for your own.

Franci Penov
I didn't mean to imply that I would need to collect the user's email... I just meant that they could use whatever email reading program they already use (e.g. Outlook, Gmail, whatevs). I like the icon ideas though... nice one.How do I create a local RSS feed?
greg7gkb
Well, in order to send the user an email through SMTP, you need to know their email address. :-)
Franci Penov
How you create an RSS feed as a local file, depends on what language you are using. There are standard libraries out there that help with creating and updating RSS feeds for every major language. You could also do it yourself - after all, RSS is just an XML file.
Franci Penov
I understand how to create an RSS feed file (for example feed.xml), but I didn't understand how you could get an RSS feed reader to recognize a local file as a feed source. For example, what would you specify as the feed URL?
greg7gkb
Ah, I see. Most RSS readers should be able to understand the file:// protocol just as well as the http:// protocol. Of course, that requires the user to use an RSS reader with access to the local file system; thus, Google Reader for example will not work.
Franci Penov
+1  A: 

If I've understood it correctly, the user is running this program on his pc, in the background.

The perfect way to notify something would be, IMHO, giving the program is minimized to the traybar, a small popup that clicked, would open a window with a weekly report.

Hope this helps.

friol
It's a good idea... I was hoping for an email notice just because email is already so pervasively checked. Having the icon flash requires the user to interface with another messaging medium, which is what I was trying to avoid. This may be the way to go though.
greg7gkb
A: 

For a simple SMTP server I use hmail. I configure it to accept all SMTP requests from the local machine, regardless of source and destination, and to deny any SMTP requests not coming from teh localhost. This will be fine if you have a centrally located application.

If you want to distribute the app you have a whole different situation; with a lot of ISPs putting restrictions on SMTP traffic your best option would be to allow users to put in their mail account details and then use that to send mail. This will ensure everyone can put in working settings. Then use whatever library or pre-made code exists for yoru language of choice to send an email using those settings.

DrStalker
+1  A: 

If you do get them to specify their own smtp server, make sure you put a "Send Test Email" button on there so they can test it. I know from experience that users always enter the wrong details when specifying a smtp server, user name, password, which is made worse since some smtp servers require a user name/password and others don't.

If they do enter the wrong details (or they change) then you might need to have some way to send them older reports, or to have some other way of notifying them that you can't send email.

Email's great, but you might need an alternative method also.

dan gibson
Good points...and here I thought this was going to be the easy part :)
greg7gkb
A: 

Does it need to be a weekly digest? Instead, how about using Growl (or equivalent) to notify the user of the tasks being completed in real-time, in the background?

albertb