Jump to content

Recommended Posts

Hi!

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

<?php

$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = "PersonWhoGetsIt@emailadress.com"; //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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.