I apologize for improper title last time around.
I can do pop functions fine (I am using php4 - the imap stuff doesn't
necessarily come built-in... I installed minimum on RH9 and went from
there. There are separate rpms for php and imap functions in php. I
added the php_imap rpm later.).
I am only having trouble sending the mail with smtp commands (I didn't
install sendmail or any other mail services that php could use with
"mail" functions.).
Original problem:
I am trying to setup my webpage with PHP and SMTP mail (without using
sendmail or any other local services). I have been looking over all the
PHP documentation I can find, and I still can't get it to work (code
below). If I telnet to James on port 25, the mail will send find, but I
can't get any data to show up with the PHP code below. I am wondering if
anyone has had similar problems with James and PHP SMTP or any clues?
Thanks.
// open connection to smtpd on port 25 (fsockopen)
$fp = fsockopen("localhost", 25);
if (!$fp) { echo "Mail was not sent. Please report send error to
webmaster.";} //greet SMTP server (HELO) fputs($fp, "HELO
www.mydomain.com\n"); // set sender (MAIL FROM) fputs($fp, "MAIL FROM:
<[EMAIL PROTECTED]>\n"); // set recipient (RCPT TO) fputs($fp, "RCPT
TO: <[EMAIL PROTECTED]>\n"); // set mail body (DATA) fputs($fp,
"DATA\n"); fputs($fp, "To: toguy\nFrom: fromguy\n Subject:
coolsubject\n\ncoolmessage\n\n.\n");
// terminate (QUIT)
fputs($fp, "QUIT\n");
// close connection (fclose)
fclose($fp);
-----Original Message-----
From: Fox Sterling [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 11:49 AM
To: James Users List
Subject: Re: Database Config
What version of PHP? 4 has support for pop3 built in. And if you are
using
a database, you could access mail directly using the mysql functions
rather
then the pop3 commands, this is the approach I am using for the webmail
scripts I'm writing.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 9/18/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 9/18/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]