• 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

#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.
 

Jeremy

Well-known member
#2
Have you created an email template called dazed_test_email?

You should also use XenForo_Mail::create and not XenForo_Mail directly.
 
#3
Have you created an email template called dazed_test_email?

You should also use XenForo_Mail::create and not XenForo_Mail directly.
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