PHP Question

Fanis Dokianakis madf at hellug.gr
Thu Oct 11 17:33:01 EEST 2001


On Thu, Oct 11, 2001 at 12:25:25PM +0300, Kekes Stamatis wrote:
>  Mipos kaneis exei asxolithei me to na steilei mail me PHP ??
>  Antimetopizo to eksis provlima:
> 
>  Se ena RH 7.1 em sendmail otan trexei ena PHP module pou stelnei ena
> e-Mail xrisimopoiei ton topiko sendmail gia na steilei to e-Mail kai
> fysika den einai aytos o mail server mou kai apotygxanei patagodos. Apo
> oso eida sta logs steleni e-Mail san
> "From:nobody at loccalhost.localdomain" kai ayto apo oso katalavaino to
> nobody to pairnei giati o apache trexei os nobody alla omos ego thelo na
> xrisimopoiiso allon mail server.
>  To exei kanei pote kaneis xrisimopoiontas tin mail() ??
>

Gia na steileis  mail meso allou smtp server mporeis na anoixeis socket.
px

$fp = fsockopen ("mail.lame.gr", 25, $errno, $errstr, 30);
if (!$fp) {
    echo "tin ekatses $errstr ($errno)\n";
} else {
    fputs ($fp, "EHLO $SERVER_NAME\n");
    fputs ($fp, "MAIL From: $sender\n");
    fputs ($fp, "RCPT To: $recipient\n");
    fputs ($fp, "DATA\n");
    fputs ($fp, "From: $sender\n Subject: $subject\n \n $body \n .\n");
    fputs ($fp, "QUIT\n";
   
    fclose ($fp);
}

sucks alla ti na kanoume

Fanis



More information about the Linux-greek-users mailing list