Jump to content

Mail from win32


regdude

Recommended Posts

Hi!

I'm using PHP6 and I'm having problems with sending a mail.

<?php

$Name = "Da Duder"; //senders name
$email = "[email protected]"; //senders e-mail adress
$recipient = "[email protected]"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

mail($recipient, $subject, $mail_body, $header); //mail command 
?>

This is a simple example and it doesn't work on my windows xp :/ (mail just doesn't come)

Why is that?

Link to comment
https://forums.phpfreaks.com/topic/149105-mail-from-win32/
Share on other sites

No.

Thats why I said I haven't did anything to php.ini

As I read an article then PHP uses a builtin server.

 

I also have a linux server that has sendmail.

Also there I didn't do anything to php.ini, but the mail seems to be sent from phpbb forum (sometimes), but not from the example script.

Link to comment
https://forums.phpfreaks.com/topic/149105-mail-from-win32/#findComment-783831
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.