Click to See Complete Forum and Search --> : IIS 5 SMTP Server and mail()


Anon
08-03-2000, 08:23 AM
Hello!

I am trying to use the SMTP server that comes with Win 2000 with php4's mail() function. The mail() function works perfect when using another SMTP server, but when using the MS SMTP server it fails (the script just hangs, and then times out).

The MS SMTP server works fine from my normal mail client, so it is kind of strange. Anyone?

- Anders Holst

Anon
08-03-2000, 02:57 PM
I have a question for you. Do you know how to add Subject and CC: with smtp mail?

I'm not sure how the $datatosend syntax works by adding $Subject there does not work

can you help me with this?

Here are the codes:
(I got this from php builder, share library,
networking,remote mail)

$datatosend = "HELO $isp_mailserver\nmail from: $from\nrcpt to: $to\ndata\n$body\n\n.\nQUIT\n";


if (!$smtp_sock = fsockopen("$isp_mailserver", 25))
{
die ("Couldn't open mail connection to $isp_mailserver! \n");
}

fputs($smtp_sock, $datatosend);

Anon
08-04-2000, 09:40 AM
Not strictly a solution, more of a work around.

The mail() function in PHP is pretty poor. If you must use NT then use a decent command line emailer, we use Windmail from www.geocel.com

It is a full featured email sender and has no trouble talking to IIS.

We use it for everything.

Bye

Matt B