-1

I use this short code to send a simple confirmation e-mail to a user who has forgotten their password and has click "generate new password"

mail($email,'password recovery','Your temporary password is '.$generatedpassword ,'From: do_not_reply@do_not_reply.com');

It works just fine on my private server but when I pushed my PHP code to BlueMix the users never get that e-mail.

As I mentioned above the code works just fine on my server, which leads me to believe that this is a BlueMix specific issue.

Umberto Manganiello
  • 3,213
  • 9
  • 16
Mike Pala
  • 766
  • 1
  • 11
  • 39
  • Hello, Epodax. Thank you for that nice little minus there but as I mentioned above the code works just fine on my server, which leads me to believe that this is a BlueMix specific issue. – Mike Pala Apr 18 '16 at 12:28
  • Hi, please don't presume that I was the one to down vote, it makes you look like a ass, SO is not a "fix my code with a very vague issue description service". – Epodax Apr 18 '16 at 12:56
  • haha, you know what? you're right. Sorry about that. Yeah I know the question might seem vague but I am hoping it will get answered by a very specific person / people who I think will know what's up. Have a great day E. – Mike Pala Apr 18 '16 at 15:00
  • How is your local server configured? Are you using an SMTP server to send the e-mail? – Umberto Manganiello Apr 18 '16 at 17:11

1 Answers1

3

That line works in your environment since you probably have a mail server configured and available there. There is no such default configuration available on Bluemix.

Your options are:

  • deploy the application on Bluemix and then point to your own server (e.g. using the public IP)
  • use Sendgrid (available directly from the Bluemix Catalog) or similar e-mail services
Umberto Manganiello
  • 3,213
  • 9
  • 16
  • When deploying the application on Bluemix, make sure you are not using port 25 because that's blocked (see also http://knowledgelayer.softlayer.com/procedure/outbound-email-port-25) – THelper Oct 31 '17 at 10:45