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

Send mail with XenForo_Mail

Discussion in 'XenForo Development Discussions' started by Dazedndconfused, Dec 28, 2015.

  1. I'm trying to send an email from an addon. Confirmation emails and email users from the contact tab works properly, so its not a configuration thing. Whats the proper way to use XenForo_Mail to send mail?

    what i have to try is this:

    $mail = new XenForo_Mail('dazed_test_email', $params, $languageid);
    $mail->send($email, $username);

    I forget where I found that, but apparently someone had that working so I figured I'd give it a try. Its not sending nor is it getting bounced, so I have no clue what is going on.
  2. Jeremy

    Jeremy Well-Known Member

    Have you created an email template called dazed_test_email?

    You should also use XenForo_Mail::create and not XenForo_Mail directly.
  3. Thanks for the reply, I got it figured out. I mispelled dazed_test_email I had it spelled dazed_tset_email.

    Also I'm using XenForo_Mail::create now, thanks :D

Share This Page