Forum Moderators: buckworks
I`m making a customized webbased shop. Now they want to automaticly print the incoming orders. The orders are coming via email. Does someone knows a email client that auto print incoming mail? or something else that can check the pop3 and print the email?
I hope this is the right place for it.
Thanks alot
But alternatively you could do it using Perl, there are many Perl Modules out there that are ready to use for reading mailboxes and the like, try Mail::Transport::Dbx for outlook express.
If your interested maybe i can come up with an example script for you.
Then your client will pick up the orders in his/her email program (outlook express?), if this is the case then you can run a perl script on the clients local machine that checks the mail box periodically and prints out any unread email notifications. You would need to shedule this script to run regularly, and you would need perl installed on that machine.
The script would probably look something like this:
#!/usr/bin/perl
use Mail::Transport::Dbx;
my $dbx = eval { Mail::Transport::Dbx->new("C:/full/path/to/mailbox/foldername.dbx") };
for my $msg ($dbx->emails) {
if ($msg->is_seen == 0){
print $msg->subject, "\n";
}
}
So in the above little script you can see that you can use the Mail::Transport::Dbx module to access your outlook express mailbox, and then go through each email in the folder to see if it has been read or not and then do something with it, in this case i just printed the subject to the screen. But you could print to your local printer.
This is the sort of script i would use, hopefully im helping here, i can go further with this if you need me to, let me know.
If your setup is different to what im talking about then provide me with some details and ill see if i can help.
Although corbings solution is probably easier :)