Wednesday 23 March 2016

email - Sent Mail in PHP throw 504 Gateway Time-out

I'm on Ubuntu VM.



I have this PHP





# --------------------------------------------------------------------------------
# Goal : send an email
# Run : curl 45.55.88.57/code/mail.php | php


$to = 'email@gmail.com';
$subject = '';
$message = 'hello';
$headers = 'From: john@gmail.com' . "\r\n" .
'Reply-To: john@gmail.com' . "\r\n" .

'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>





I ran this :




curl 45.55.88.57/code/mail.php  | php


I get this



  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload Upload Total Spent Left Speed
100 176 100 176 0 0 2 0 0:01:28 0:01:00 0:00:28 45

504 Gateway Time-out


504 Gateway Time-out



nginx





Is my code is wrong, or is something wrong with my VM?



I don't get any emails.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...