Thread:Project:Support desk/Can't Get Mediawiki:Emailsender v1.23.6 to work./reply (8)

That code from the previos post is actually what I'm using.

I don't think it's the SMTP server that's doing anything wrong.

I have made this PHP script for testing, and it works like a charm. It's shows the alternative displayname as intended.

"; $to = "My.Name@mydomain.lan"; $subject = "Test from server"; $body = "Hi,\n\nHow are you?"; - $host = "exchange.mydomain.lan"; $username = "dummy"; $password = "dummypwd"; - $headers = array ('From' => $from,  'To' => $to,   'Subject' => $subject); $smtp = Mail::factory('smtp',  array ('host' => $host, 'auth' => false, 'username' => $username, 'password' => $password)); - $mail = $smtp->send($to, $headers, $body); - if (PEAR::isError($mail)) { echo("  " . $mail->getMessage . "   "); } else { echo("  Message successfully sent!!   "); } ?>