sillybilly
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: “The e-mail could not be sent.”Replaced wp_mail function to the following. Works fine.
————————————————————————————–
function wp_mail($to, $subject, $message, $headers = ”, $more = ”) {
if( $headers == ” ) {
$headers = “MIME-Version: 1.0\n” .
“Content-Type: text/plain; charset=\”” . get_settings(‘blog_charset’) . “\”\n”;
}include_once ‘Net/SMTP.php’;
$host = “my.smtp.host”;
$port = 25;
$from = “donotreply@my.web.site”;$text_headers = “From: $from\nTo: $to\nX-Mailer: Socket Mailer\nSubject: $subject\n$headers”;
if (!($smtp = new Net_SMTP($host, $port))) { return false; }
if (PEAR::isError($smtp->connect())) { return false; }
if (PEAR::isError($smtp->mailFrom($from))) { return false; }
if (PEAR::isError($res = $smtp->rcptTo($to))) { return false; }
if (PEAR::isError($smtp->data($text_headers . “\n” . $message))) { return false; }$smtp->disconnect();
return true;}
Forum: Fixing WordPress
In reply to: “The e-mail could not be sent.”OK, understood.
PHP invokes sendmail directly! Odd idea. Sendmail binary can’t be called directly by user nobody. Period.
Now looking for a stub that does mail submission via socket.Forum: Fixing WordPress
In reply to: “The e-mail could not be sent.”Well, I suspect the prob is somewhere deeper.
A test script from exampe at your URL worked fine, regardless of safe_mode directive. The wordpress function didn’t. Looking for user permissions…
Forum: Fixing WordPress
In reply to: “The e-mail could not be sent.”HOW?