fafa0 Posted November 8, 2014 Share Posted November 8, 2014 Hi I have below code : <?php $_SERVER['SERVER_NAME']; $to = "[email protected]"; $subject = "Test mail"; $body = $_SERVER['SERVER_NAME']; $from = "[email protected]"; $headers = "From:" . $from; mail($to, $subject, $body, $headers) ?> the email is sent correctly but without any body text . I use $_SERVER['SERVER_NAME']; but nothing show as body . I want to use this code load each day becuse I want to know which domain is used my script. but now the code not work. Link to comment https://forums.phpfreaks.com/topic/292365-help-for-sending-email/ Share on other sites More sharing options...
ginerjm Posted November 9, 2014 Share Posted November 9, 2014 Why don't you put a "real" body text in there and see what happens? Link to comment https://forums.phpfreaks.com/topic/292365-help-for-sending-email/#findComment-1496207 Share on other sites More sharing options...
ginerjm Posted November 9, 2014 Share Posted November 9, 2014 Actually if you remove that silly first line that does nothing and add a semi to the last line it works just fine for me. Link to comment https://forums.phpfreaks.com/topic/292365-help-for-sending-email/#findComment-1496208 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.