Reply to Re: Using PHP to parse emails and print to specific printer

Your name:

Reply:


Posted by Jerry Stuckle on 08/17/06 03:52

Alex wrote:
> Hi everyone,
>
> We're trying to write a script that will monitor 6 email addresses and
> if an email arrives it will print to a specific network printer based
> on the email address. So if the address is 'department1@domain.com' it
> will print to 'dept1ptr'. Each printer can be setup either on a
> network print server or printed to directly via IP address... they're
> all HP printers.
>
> Any suggestions on a route to go with this? I'm very familiar with PHP
> but I've never written a script to do something like this... and if PHP
> isn't the right avenue to take, I'd love other options.
>
> Thanks in advance for any suggestions on how to approach this. Take
> care,
>
> Alex.
>

Alex,

You have two possibilities, depending on the mail server you're using.

If the mailserver allows piping, you can pipe the incoming mail to the
script with the appropriate recipient (details depend on the server).

If not, you can set up a cron job to monitor the queue for input. For
instance, if it is a POP3 server, you could open a socket to port 110
(POP3 port), enter the userid and password and see if there is any
incoming mail. If there is, receive and process it. A bit complicated,
but not too bad.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация