1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

As Designed XenForo_ControllerAdmin_User::actionEmailSend doesn't use XenForo_Mail

Discussion in 'Resolved Bug Reports' started by Jeremy, May 2, 2013.

  1. Jeremy

    Jeremy XenForo Moderator Staff Member

    It uses XenForo_Mail::getDefaultTransport(), but not XenForo_Mail::create() which is consistent everywhere else. Not sure if a mis-code or as designed. Thought it weird to use Zend_Mail here.
     
    tyteen4a03 and xf_phantom like this.
  2. xf_phantom

    xf_phantom Well-Known Member

    Do you mean actionEmailSend?:D (at least that's the name in my file^^)
    and in
    XenForo_ControllerAdmin_User::_sendEmail XenForo_Mail isn't even used.
    It's just
    PHP:
    $mailObj = new Zend_Mail('utf-8');
    $mailObj->setSubject($email['email_title'])
    ->
    addTo($user['email'], $user['username'])
    ->
    setFrom($email['from_email'], $email['from_name']);
     
  3. Jeremy

    Jeremy XenForo Moderator Staff Member

    Yes, yes I did. XenForo_ControllerAdmin_User::_sendEmail proxy uses XenForo_Mail in the $transport.
     
  4. Mike

    Mike XenForo Developer Staff Member

    This is intentional. I'm assuming that there's a suggestion here, but you might want to make another thread for that. :)
     
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    Not really. I was just looking through code and noticed this was one spot where it wasn't used. Thought I'd throw it out there. :) any particular reason why?
     
  6. xf_phantom

    xf_phantom Well-Known Member

    I'm also interested into the reason, because it is IMO a bug.

    If i use a proxy mail class to use a own transport (what i'm doing), it won't have any effect in this case and will use the default xenforo configuration instead of my "injected" transport object


    (good that i never used the acp mail feature:D )
     
  7. SneakyDave

    SneakyDave Well-Known Member

    Is it because they want to keep the admin email methods "untainted" by any add-ons mucking with them?
     

Share This Page