- $addrtype = explode(',', strtolower($addrtype));
- if (!is_array($addrtype)) { $addrtype = array('to','cc','bcc'); }
+ if (!is_array($addrtype)) {
+ if (strlen($addrtype)) { $addrtype = explode(',', strtolower($addrtype)); }
+ else { $addrtype = array('to','cc','bcc'); }
+ }