Hi:
i'm trying to send a mail with this code, but it doesn't work. Please help
@$CDONTS = new COM("CDONTS.NewMail");

@$CDONTS->From = "abc@def.com";
@$CDONTS->To = "hij@qlm.com";
@$CDONTS->CC = "xyz@sss.com";

@$CDONTS->BodyFormat = 0;
@$CDONTS->MailFormat = 0;

@$CDONTS->Subject = "Using CDONTS with PHP4 and IIS";
@$CDONTS->Body = "Blah blah blah blah, bleh...";

@$CDONTS->Send();
@$CDONTS->Close();

print "Mail sent";

?>

    What do you mean "it doesn't work"?
    What does it do instead? Send out for pizza? Probably just prints 'Mail sent', because with all those @ signs there, you've turned off all of your error reporting.

      you are rigth
      i take off the @ and the error is:
      Warning: (null)(): Unable to lookup close: Nombre desconocido. in c:\inetpub\wwwroot\prueba\email.php on line 18.
      the line 18 is:
      $CDONTS->Close();
      and it doesn't send

        Write a Reply...