Opened 13 years ago
Closed 13 years ago
#17228 closed defect (bug) (fixed)
Error: Could not instantiate mail function
Reported by: | vegasgeek | Owned by: | |
---|---|---|---|
Milestone: | 3.2 | Priority: | normal |
Severity: | normal | Version: | 3.2 |
Component: | Keywords: | needs-patch | |
Focuses: | Cc: |
Description
WP Version: 3.2-bleeding (rev 17693)
Error Message:
Could not instantiate mail function. Could not instantiate mail function. Could not instantiate mail function.
Warning: Cannot modify header information - headers already sent by (output started at /var/www/wpcore/wp-includes/class-phpmailer.php:586) in /var/www/wpcore/wp-includes/pluggable.php on line 885
Process to reproduce:
In network admin, Add site. After submiting new site details, the above error message shows up.
Notes:
This is running on my local dev server that does NOT have mail functionality turned on. Although it's no surprise that it can't send email, this error message is new as of the past 3 days (sorry I don't know the previous revision number I was on). Prior to an SVN UP a couple days ago, adding new sites would work fine and the mail portion would fail gracefully.
Attachments (1)
Change History (8)
#3
@
13 years ago
basically, PHPMail now uses exceptions.
Here's an example of a API function:
if (!self::ValidateAddress($address)) { $this->SetError($this->Lang('invalid_address').': '. $address); if ($this->exceptions) { throw new phpmailerException($this->Lang('invalid_address').': '.$address); } echo $this->Lang('invalid_address').': '.$address; return false; }
So other than modifying phpmailer to remove all the echo's for any failure of any kind, we can wrap every API call in a try {}..
#4
@
13 years ago
- Component changed from Network Admin to Mail
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 3.2
- Version changed from 3.1 to 3.2
Forgot to mention, the new site gets created successfully.