Forum Moderators: buckworks

Message Too Old, No Replies

Automatic print

Print mail at incoming

         

ikke

7:23 am on May 10, 2005 (gmt 0)

10+ Year Member



Hello,

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

Mike12345

8:16 am on May 10, 2005 (gmt 0)

10+ Year Member



I dont know about a mail client that supports auto printing, but im sure there is one.

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.

ikke

8:59 am on May 10, 2005 (gmt 0)

10+ Year Member



I`m hosting the website elsewhere so I dont have a own server. If that is not a problem than I would an example. The hosting supports perl.

corbing

1:17 pm on May 10, 2005 (gmt 0)

10+ Year Member



If you use Outlook, you can create a rule that automatically prints a message based on any criteria (subject, sender, etc). I believe Thunderbird can do this also.

Mike12345

1:26 pm on May 10, 2005 (gmt 0)

10+ Year Member



OK, so your web shop will send an email notification to your client via email.

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 :)

ikke

11:29 am on May 18, 2005 (gmt 0)

10+ Year Member



Thanks for the suggestions,

I now use The Bat mail program very good it`s print all incoming mail and sort it in maps. It works very good.

Bye,