Saturday 13 January 2018

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<br /> Time-out
bgcolor="white">

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

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...