-1

PHP is not my language (c#) but i need a certain function where there is a response by email.

I have to domains, on both domains the same simple script:

<?php
  $to = "aaa@dom1.nl;aaa@dom2.nl";

   $subject = "Test mail";

   $message = "Hello! This is a simple test email message.";

   $from = "aaa@dom3.nl";

   $headers = "From:" . $from;

   mail($to,$subject,$message,$headers);

   echo "Mail Sent.";
?>

When the script is started from dom1 the only mail received is on dom1 and not on dom2. When it is started on dom2 only dom2 receives the mail.

What am i missing?

thanks

It appears that the site provider only permits php mail to be send inside the domain....

leon
  • 1
  • 3

1 Answers1

0

You should be using comma to separate emails:

to

Receiver, or receivers of the mail.

The formatting of this string must comply with » RFC 2822. Some examples are:

  • user@example.com
  • user@example.com, anotheruser@example.com
  • User <user@example.com>
  • User <user@example.com>, Another User <anotheruser@example.com>
Gabriel Santos
  • 4,934
  • 2
  • 43
  • 74