Page 1 of 1
recieve mail with php
Posted: Sat Sep 27, 2003 3:49 pm
by Howard547
Lets say i sent up an email adress "
johndoe@domain.com." Whenever someone sends an email to "
johndoe@domain.com" the message is sent to a php script where it then parses, and puts relevant information into a database.
A real life example of this is with
DeskPro. You can post tickets to your account by emailing a support email account.
Does anybody know how to do this?
Posted: Sat Sep 27, 2003 7:19 pm
by Cruzado_Mainfrm
you will have to deal with Socket Programming, as this is not a simple task to do, you'll have to understand how to talk to a POP3 or IMAP server
Posted: Sat Sep 27, 2003 9:08 pm
by volka
fortunately php
knows how to deal with imap/pop3 servers
http://php.net/imap
But the script will not automagically be invoked when an email arrives. You have to take care of that yourself (e.g. by polling)
Posted: Sat Sep 27, 2003 9:32 pm
by Cruzado_Mainfrm
lol i think i skipped that part when reading the php manual

my bad
by the way, you can check for e-mails by setting cronjobs (only in unix)
Posted: Sat Sep 27, 2003 10:03 pm
by evilMind
Just be careful if you are using software like vpopmail or anything that will allow virtual domains. Sometimes imap/pop3 doesn't like to connect unless you use "{foo.bar.com:143/imap/notls)" as the mailbox string.