Help needed with Accounts.forgotPassword

Hello, I am having trouble with Accounts.forgotPassword.
I have done the following:

  1. I set the process.env.MAIL_URL to “smtp://”;
  2. I am calling the forgotten pass function on the client (I think) as follows:
import React from "react";
import {Link} from 'react-router';
import LanguageChanger from '../ui/LanguageChanger';
import {Session} from "meteor/session";
import {withTracker} from "meteor/react-meteor-data";
import PropTypes from 'prop-types';
import {Accounts} from 'meteor/accounts-base';

export class ForgottenPassword extends React.Component{
    constructor(props) {
        this.state =  {

    onSubmit(e) {
        let email =;
        console.log('email', email);

        Accounts.forgotPassword({email: email}, function (e, r) {
            if (e) {
            } else {
                // success

    render () {

        return (
                <h1> {this.props.staticTexts.forgottenPasswordTexts[0]} </h1>
                {this.state.error?<p>{this.state.error}</p> : undefined}
                <form onSubmit={this.onSubmit.bind(this)} noValidate>
                    <input type="email" ref="email" name = "email" placeholder = {this.props.staticTexts.forgottenPasswordTexts[1]} />
                    <button> {this.props.staticTexts.forgottenPasswordTexts[2]}</button>
                <Link to="/"> {this.props.staticTexts.forgottenPasswordTexts[3]}</Link>
ForgottenPassword.propTypes = {
export default withTracker( () => {
    const   staticTexts = Session.get('staticTexts');
    return {
}) (ForgottenPassword);

And each and every time I run this on my localhost:3000, I get the following output…

I20190117-14:50:06.709(2)? Exception while invoking method 'forgotPassword' { Error: connect ETIMEDOUT
I20190117-14:50:06.711(2)?     at Object._errnoException (util.js:992:11)
I20190117-14:50:06.711(2)?     at _exceptionWithHostPort (util.js:1014:20)
I20190117-14:50:06.711(2)?     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
I20190117-14:50:06.712(2)?   code: 'ECONNECTION',
I20190117-14:50:06.712(2)?   errno: 'ETIMEDOUT',
I20190117-14:50:06.712(2)?   syscall: 'connect',
I20190117-14:50:06.713(2)?   address: '',
I20190117-14:50:06.713(2)?   port: 587,
I20190117-14:50:06.713(2)?   command: 'CONN' }

I tried many things, for example:

  1. uninstall and reinstall email package with version 1.2.0,
  2. try to set smtp server
  3. deploy to heroku and add that domain to mailgun (which is what I am trying to use here)…
    and so on…
    Can you please help me out, because I am starting to lose my patience and this is not good… (e.g. the computer is in grave danger - and he is innocent as always)… Or is he??

All the best,
Peter Y.

I ping your mailgun domain, it’s not I think there is something wrong with your MAIL_URL env.

Ok, but what could it be?
It is placed in the server and it looks like this:

import { Meteor } from 'meteor/meteor';
import '../imports/api/users';

Meteor.startup(() => {

Other than that I even tried an external service, which did send the email, so you are most likely right…

I mean… do I need to configure something else, like an IP or anything, because this is the only config I am doing…

are you sure those sandbox account works?

So it seems…

OMG!!! Sorry to waste your time… I WAS DOING IT WRONG…
I followed this link: and there it is: Mail_URL = username with the - fantastic…
Anyway - it works now.
Thank you so much for your time and support - I nearly lost hope to ever fix it…

1 Like