Function send_check_mail ($ email, $ subject, $ uid, $ buffer)
{
Echo "hello ";
$ Command = "/var/qmail/bin/qmail-inject". $ email; // qmail program address. $ email is the address to be sent.
$ Handle = popen ($ command, "w"); // open the pipeline
If (! $ Handle ){
Return false;
}
$ From = "yangxuemei2012@111cn.net"; // sender
Fwrite ($ handle, "from:". $ from. "n"); // write data to the pipeline
Fwrite ($ handle, "return-path:". $ from. "n ");
Fwrite ($ handle, "to:". $ uid. "n ");
Fwrite ($ handle, "subject:". $ subject. "n ");
Fwrite ($ handle, "mime-version: 1.0n ");
Fwrite ($ handle, "content-type: text/html; charset =" gb2312 "nn ");
Fwrite ($ handle, $ buffer. "n ");
Pclose ($ handle); // Close the MPs queue
Return true;
}
$ Subject = "test email ";
$ Uid = $ _ post ['uid']; // from information
$ Content = "
. "Hello! <Br> Thank you, www.111cn.net! <Br </body>
$ U_email = "machunjie2003@111cn.net"; // email
If (send_check_mail ($ u_email, $ subject, $ uid, $ content )){
Echo "Congratulations! Send a voting email to your mailbox! <Br> check your email address: <font color = # cc0033> ". $ u_email." </font> <br> ". $ close;
} Else {
Echo "unfortunately, failed to send the voting email to your mailbox. Please try again or contact the developer. <Br> ". $ close;
}