I've got a php file that works fine when sending to one email address (from a flash form) but it won't work when I put two in? I need it to send the emails to me and someone else, whether it cc's them or just straight sends doesn't matter, its fine either way. I've tried this way- $to = "me@mysite.com,tom@mysite.com"; PHP: and this way- $to = "me@mysite.com"; $to .= "tom@mysite.com"; PHP: But neither seem to work, is there a different way to do it, those seemed the most obvious to me? Thanks in advance for any help with this, its really stumped me...
Email addresses must be separated with comma: $to = 'me@mysite.com, tom@mysite.com'; PHP: If that doesn't work, what kind of error are you getting?
I regularly use $to='name@domain.com,name2@domain.com'; PHP: The only difference I see is single quotes vs. double quotes. Like RK said, what error are you getting? I don't know if I've tried comma-space instead of just a comma as a separator.
The external SMTP server may not be set up right. You'll have to make sure your php.ini settings are correct and check that the server is running.
we can send same message to multiple user by simply using php code like this $to='name1@domain1.com,name2@domain2.com'; in this code you can give multiple address by just seprating each address by (,)