Title: Timeout on sending mail
Last modified: September 1, 2016

---

# Timeout on sending mail

 *  Resolved [Jamesits](https://wordpress.org/support/users/jamesits/)
 * (@jamesits)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/timeout-on-sending-mail/)
 * This plugin is always giving me a `504 Gateway Time-out` after a long wait while
   sending test mails.
 *     ```
       OS: Linux [hostname] 4.2.0-42-generic #49-Ubuntu SMP Tue Jun 28 21:26:26 UTC 2016 x86_64
       PHP version: 5.6.11-1ubuntu3.4
       WordPress version: 4.6
       WordPress multisite: No
       openssl: Available
       allow_url_fopen: Enabled
       stream_socket_client: Available
       fsockopen: Available
       ```
   
 * [https://wordpress.org/plugins/smtp-mailer/](https://wordpress.org/plugins/smtp-mailer/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/timeout-on-sending-mail/#post-7680987)
 * Hi, Can you please copy and paste the email log? How did you configure it in 
   the settings?
 *  Thread Starter [Jamesits](https://wordpress.org/support/users/jamesits/)
 * (@jamesits)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/timeout-on-sending-mail/#post-7681094)
 * Hi, I need instructions on obtaining email log. I used Mailgun’s SMTP server 
   and I didn’t see any log from that server. It seems WordPress got stuck before
   it was sent.
 * Today I tried some more configuration. Sending with no encryption seems to be
   fine, but when TLS is enabled, it just stuck.
 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/timeout-on-sending-mail/#post-7681197)
 * I mean the log that you see when you send a test email. Which port did you use
   with no encryption? Did you try TLS on port 587? How about SSL on port 465?
 *  Thread Starter [Jamesits](https://wordpress.org/support/users/jamesits/)
 * (@jamesits)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/timeout-on-sending-mail/#post-7681202)
 * I didn’t see any logs, since server timed-out.
 * PS: the problem is gone after I upgraded to PHP7.0 .
 *  [smrezvani](https://wordpress.org/support/users/smrezvani/)
 * (@smrezvani)
 * [9 years ago](https://wordpress.org/support/topic/timeout-on-sending-mail/#post-9081365)
 * Hi.
    I have same problem with GMAIL SMTP plugin. I configured plugin and everything
   is fine. But when wordpress send email from test mail or any other form I get`
   504 Gateway Time-out` and email sent. At first I installed php7.1. I even downgrade
   php to 7.0 and still I have same problem. Unfortunatly plugin doesn’t have any
   log and I can’t find the problem. Please help
 * Best regards.
 *  [fatyandao](https://wordpress.org/support/users/fatyandao/)
 * (@fatyandao)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/timeout-on-sending-mail/#post-9300161)
 * I know why. it’s beause my Hosting provider blocked the port in which I’m connecting
   to Gmail. In my case, it was port 587.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Timeout on sending mail’ is closed to new replies.

 * ![](https://ps.w.org/smtp-mailer/assets/icon-128x128.png?rev=1312656)
 * [SMTP Mailer](https://wordpress.org/plugins/smtp-mailer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smtp-mailer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smtp-mailer/)
 * [Active Topics](https://wordpress.org/support/plugin/smtp-mailer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smtp-mailer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smtp-mailer/reviews/)

## Tags

 * [timeout](https://wordpress.org/support/topic-tag/timeout/)

 * 6 replies
 * 4 participants
 * Last reply from: [fatyandao](https://wordpress.org/support/users/fatyandao/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/timeout-on-sending-mail/#post-9300161)
 * Status: resolved