我已经在php中编写了与发送无效邮件有关的代码。我应该在系统外部配置邮件服务来发送邮件吗?
$to = "sandeep.v@redpot.in";
$subject = "Asking";
$message = "How do u do";
$header = "From:sanv0428@gmail.com";
$retval = mail ($to,$subject,$message,$header);
if( $retval == true )
{
echo "Message sent successfully...";
}
else
{
echo "Message could not be sent...";
}
我在Android中使用http
的这个php函数HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://192.168.1.138/Android/App/getmail.php");
提前感谢您的帮助和时间。