ted_chou12 Posted December 30, 2006 Share Posted December 30, 2006 I wish to check if my host has mail enable, because ive changed to another one, so I uploaded a php file that has this included:<?php phpinfo(); ?>It does show a lot of information but I dont know which one to look for, can anyone give me any ideas?ThanksTed Link to comment https://forums.phpfreaks.com/topic/32283-how-to-check-if-host-has-mail-enabled/ Share on other sites More sharing options...
Psycho Posted December 30, 2006 Share Posted December 30, 2006 Why not just upload a file with this (changing the "[email protected]" to your email address) and then run it?<?php$to = '[email protected]';$subject = 'Mail test';$message = 'This is a test email';$headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion();mail($to, $subject, $message, $headers);?> Link to comment https://forums.phpfreaks.com/topic/32283-how-to-check-if-host-has-mail-enabled/#findComment-149857 Share on other sites More sharing options...
ted_chou12 Posted December 30, 2006 Author Share Posted December 30, 2006 I tried alreay, my mail script has the message, but it always appears message delivery failed, so i want to see if they have the mail function enabled. Link to comment https://forums.phpfreaks.com/topic/32283-how-to-check-if-host-has-mail-enabled/#findComment-149863 Share on other sites More sharing options...
Psycho Posted December 30, 2006 Share Posted December 30, 2006 Well, to answer your question directly, when I run phpinfo on my windows box I have the following settings (section names in bold):[b]core[/b]mail.force_extra_parameters : no value : no valuesendmail_from : no value : no valuesendmail_path : no value : no value[b]standard[/b]Internal Sendmail Support for Windows : EnabledI would assume that last one is the one you are looking for and that there would be a similar setting in Linux. You might want to check with your host. Plus the email could be blocked by spam filtering somewhere in the process. Link to comment https://forums.phpfreaks.com/topic/32283-how-to-check-if-host-has-mail-enabled/#findComment-149870 Share on other sites More sharing options...
michaellunsford Posted December 30, 2006 Share Posted December 30, 2006 you're looking to see if sendmail_path or "path to sendmail" has a value.http://us2.php.net/mail Link to comment https://forums.phpfreaks.com/topic/32283-how-to-check-if-host-has-mail-enabled/#findComment-149872 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.