Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#9062 closed defect (bug) (duplicate)

Not mailing in Windows Server

Reported by: claor's profile Claor Owned by: claor's profile Claor
Milestone: Priority: normal
Severity: minor Version: 2.7
Component: Mail Keywords: class-phpmail
Focuses: Cc:


There is a bug in the class-phpmailer.php that make impossible to send mails from Windows IIS Servers.

This bug can be solved by changing same part of the code of that file.

=========Bugged part of code=========


  • Formats an address correctly.
  • @access private
  • @return string */ function AddrFormat($addr) { if(empty($addr[1])) $formatted = $addr[0]; else { $formatted = $this->EncodeHeader($addr[1], ‘phrase’) . ” <” . $addr[0] . “>”; }

return $formatted;



  • Formats an address correctly.
  • @access private
  • @return string */ function AddrFormat($addr) {

$formatted = $addr[0];

return $formatted;

I attached a corrected file.

Attachments (1)

class-phpmailer.php (56.4 KB) - added by Claor 13 years ago.
With corrected bug

Download all attachments as: .zip

Change History (7)

13 years ago

With corrected bug

#1 @DD32
13 years ago

This has been mentioned elsewhere, Causing a problem with another mail server software.

Specifically, in that case, Quotations were being added AROUND the output from a function like the above.. (so it was "wordpress <>"). The way that function acts, is perfectly to spec. (Its how you see that a email is from "Joe Blogs" and not from "joe@…")

See Also: #6829 #8800
(Actually, this is surely a dupe of one of those)

#2 @Claor
13 years ago

  • Owner set to Claor
  • Status changed from new to assigned

You are right, this is a dupe... And so, this is a mail server problem and not a windows problem?

#3 @DD32
13 years ago

Its a combination between the MTA being used and the PHP code. The code you've proposed 'fixes' the problem, but only in a workaround way, by removing some functionality.

I dont have any method of testing anything myself though.. As mail simply doesnt work on my host at all(not a wordpress problem)

#4 @Claor
13 years ago

You are right again, my solution deletes sender's name bet that was the solution i found to get it working by now.

#5 @Claor
13 years ago

  • Resolution set to duplicate
  • Status changed from assigned to closed

#6 @DrewAPicture
7 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.