![]() |
| ||
| php e-mail problem I have some simple php code. It worked fine on the old server, but now I am getting an error on the new server. Both former and present servers are Linux. <?php Here is my error message that I get from the mail server in an e-mail. Subject line is Quote:
Quote:
|
| ||
| i made an email class. try it and make sure that you have the headers formed correctly. http://www.daniweb.com/forums/thread155761.html - Post #12 then we will see if something is wrong the the server config. |
| ||
| Re: php e-mail problem Quote:
As far as my problem goes, I did an experiment and if I change line 10 from: $headers = "From: " . $from . "\r\n" . "Cc: " . $cc1 . " " . $cc2; to $headers = "From: " . $from . "\r\n" . "Cc: " . $cc1 . ", " . $cc2;Note the added comma above. It seems to work better. Are you supposed to separate the addresses with a comma? I'll get back to you regarding your e-mail class. That could have great potential. Thank you! |
| ||
| Re: php e-mail problem Hi, This may be way off the mark, but have you tried adding a comma between $cc1 and $cc2?? Hence, $headers = "From: " . $from . "\r\n" . "Cc: " . $cc1 . ", " . $cc2; That may be why the gmail address is not allowed to follow the abc address. Best, Rob. |
| ||
| Re: php e-mail problem Quote:
|
| ||
| Re: php e-mail problem No problem, and one last thing to tidy the line of code up... $headers = "From: $from\r\nCc: $cc1, $cc2"; You don't need to concatenate if the variables are enclosed within double quotes, although being a postaholic, I expect you know this :) A matter of personal preference I suppose. R. |
| All times are GMT -4. The time now is 8:46 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC