Wednesday, September 25, 2019

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

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...