Mulitple emails using php


#1

Greetings,
I have a html form that when filled out and submitted writes to a database and sends out an email to the admin at a dreamhost hosted website using php mail() of the data entered. I also grab the email of the person who filled out the form (which they supply) and try to send them the same email.
It seems to only generate the second email if the person who fills out the form uses gmail. Any other domain is ignored even though their email address is in the To: line of the email sent to the admin. Yet the user doesn’t get an email (unless they have a gmail account). So it seems…

php code is below and $clientemail is the email of the person who filled out the form.
$to = "admin@mydomain.com," .$clientemail;

How do I get the same email to the user who filled out the form AND the admin?

Don


#2

can you bcc the admin?

something like:

$headers = array();
$headers[] = 'From: ' . $sender;
$headers[] = 'Bcc: admin@mydomain.com';
mail($clientemail,$subject,$content,join("\r\n", $headers));

#3

Is the “From” of your email a validaddress@yourdomain.com ?

at one time you could make the “From” anything you wanted, however due to mass spam which got dreamhost servers blacklisted you can no longer do that. The “From” must be included and it needs to be an address @yourdomain

It’s worth mentioning because oddly the implementation seems to not effect everyone the same way. Even tho the change was well over a year ago (perhaps coming up on 2 years) there are still posters here that are just discovering this change.


#4

LakeRat,
Yes the From: is definitely our dreamhost domain. We been testing it a lot and it appears that it may be an issue sending to Microsoft domains (msn, live). All other domains seem to be working. We’ll keep testing.

[quote=“LakeRat, post:3, topic:60585”]
Is the “From” of your email a validaddress@yourdomain.com ?

at one time you could make the “From” anything you wanted, however due to mass spam which got dreamhost servers blacklisted you can no longer do that. The “From” must be included and it needs to be an address @yourdomain
[hr]
Sierracircle,
That’s a great idea. Thanks for sharing. It at least gives me a different way of setting up my php and the blocking servers may like it this way better.
Don