[wp-hackers] calling wp_mail on init

Rafael Ehlers rafaehlers at gmail.com
Tue Nov 6 03:39:43 UTC 2012


Thanks ClouPress, just figured it out, it was a problem with some headers!
:P

Thanks guys!



2012/11/6 CloudPress Hosting <cloudpresshosting at gmail.com>

> Does mail() work on the server, perhaps it has to do with server
> configuration.
>
> On Mon, Nov 5, 2012 at 6:25 PM, Rafael Ehlers <rafaehlers at gmail.com>
> wrote:
>
> > Im having a problem with wp_mail dont sending emails on a function called
> > on a init hook:
> >
> > function function_name() {  if($_GET['pass']){ wp_mail($email, $subject,
> > $msg, $headers ); } }
> > add_action('init','function_name');
> >
> > I´ve read here
> >
> http://wordpress.stackexchange.com/questions/44387/wp-mail-is-undefinedthat
> > I may be calling the function wp_mail too early.
> >
> > But I really need to catch this $_GET on init so that I can properly
> show a
> > message to a user on a regular page.
> > If I use plugins_loaded I can´t pass the vars to display on a regular
> page
> > after.
> >
> > I´ve tried to use require_once(ABSPATH . WPINC . '/pluggable.php'); but
> it
> > wont work either.
> >
> > Any ideas?!
> >
> > Thanks!
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list