#29175 closed defect (bug) (duplicate)
email sender, non standard subdomain
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.0 |
| Component: | Keywords: | ||
| Focuses: | Cc: |
Description
site generates sender addresses in the form of wordpress@…
in pluggable.php line 349 to 353 instead of using substr to cut off 'www.' from $sitename use parse_url($sitename)host? to make it work with non-standard subdomains aswell
Change History (3)
Note: See
TracTickets for help on using
tickets.
need to be:
if(count(explode('.', $sitename)) > 1) { $sitename = explode('.', $sitename); $sitename = $sitename[count($sitename)-2] . '.' . $sitename[count($sitename)-1]; }in fact, but won't work for two-segment TLD's such as .co.uk where something more elaborate is needed, see: https://gist.github.com/pocesar/5366899