• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

SMTP Emails Not Sending

Jeremy P

Well-known member
#1
I am using Google Apps to power email for the domain, and to prevent being marked as spam, have configured XenForo to send mails through Google's SMTP servers. However, emails aren't being sent.

I am certain it is configured properly, and have tested it with equivalent settings using PHPMailer on the server, which was able to send them fine. When I test is with a contact email in XenForo, no errors are given, but yet the email is not received.

I'm not sure if this is a bug in the software, or what could be preventing them from being sent, but I would appreciate any help or information on the problem.

Thanks.
 

ENF

Well-known member
#2
Hi,

I can confirm that Google Apps SMTP works with the current build of XenForo.

My specific settings that work:

SMTP: smtp.gmail.com Port: 587
Username: myaccount@mydomain.com (matching password set correctly)
Encryption: TLS

The sent email appears correctly in the "sent" items on the account used to send mails and the target email address receives the email correctly.
 

Blandt

Well-known member
#3
I am using Google Apps to power email for the domain, and to prevent being marked as spam, have configured XenForo to send mails through Google's SMTP servers. However, emails aren't being sent.

I am certain it is configured properly, and have tested it with equivalent settings using PHPMailer on the server, which was able to send them fine. When I test is with a contact email in XenForo, no errors are given, but yet the email is not received.

I'm not sure if this is a bug in the software, or what could be preventing them from being sent, but I would appreciate any help or information on the problem.

Thanks.
Are you using a shared hosting ?
 

Jeremy P

Well-known member
#4
Still no luck. I was using SSL on port 465, and as I said I have tested the configuration with PHPMailer, which was able to send them fine. Would there be something required on the server-side that is XenForo/Zend_Mail specific to send via SMTP?
 

ENF

Well-known member
#9
The PHP mail settings should have no impact on SMTP usage.

If I'm not mistaken, using the SMTP option (vs. default) in XenForo skips the mail configuration in PHP and strictly uses SMTP.
 

Blandt

Well-known member
#10
The PHP mail settings should have no impact on SMTP usage.

If I'm not mistaken, using the SMTP option (vs. default) in XenForo skips the mail configuration in PHP and strictly uses SMTP.
Yes you are absolutely right ! and that's why phpmail works and not SMTP.
Check your IP tables man! your port is blocked (most likely)
 

Jeremy P

Well-known member
#11
The PHP mail settings should have no impact on SMTP usage.


If I'm not mistaken, using the SMTP option (vs. default) in XenForo skips the mail configuration in PHP and strictly uses SMTP.
That is what I was thinking.
Yes you are absolutely right ! and that's why phpmail works and not SMTP.
Check your IP tables man! your port is blocked (most likely)
I have tried disabling the firewall entirely with no luck. When I say PHPMailer, I mean this, which is a library for sending directly via SMTP as well. Using that, the email sends fine. I am very puzzled as to why it won't work with XenForo.
 

Blandt

Well-known member
#12
That is what I was thinking.

I have tried disabling the firewall entirely with no luck. When I say PHPMailer, I mean this, which is a library for sending directly via SMTP as well. Using that, the email sends fine. I am very puzzled as to why it won't work with XenForo.
Just purge sendmail and install postfix. The only option left is that sendmail is not configured properly and I am certain postfix will work out of the box (I tired it on several xenforo installations for members on here)
 

ENF

Well-known member
#13
gmailsmtpconfig.jpg
Just for posterity, I've attached my SMTP configuration screen capture from XenForo.

The only other things I can suggest is trying the different port. Google Apps specifies that TLS be used with port 587. SSL is 465. (http://mail.google.com/support/bin/answer.py?hl=en&answer=13287)

So, if you have not tried it, use port 587 in XenForo, using the TLS option.

Let us know how it turns out.

Edit: My point here, I've had problems in the past in using SSL with Google Apps. TLS has been more reliable and always works, whereas SSL just wouldn't work in some cases.
 

Jeremy P

Well-known member
#14
Just purge sendmail and install postfix. The only option left is that sendmail is not configured properly and I am certain postfix will work out of the box (I tired it on several xenforo installations for members on here)
I have dropped sendmail and installed postfix, not sure it would make much of a difference here, but just in case. Still no luck.

Edit: My point here, I've had problems in the past in using SSL with Google Apps. TLS has been more reliable and always works, whereas SSL just wouldn't work in some cases.
I appreciate the help, unfortunately neither option will work for me. The only thing I can think of is I am overlooking a very simple typo, however after checking over and over, I don't believe I am. Any other suggestions?
 

Attachments

Blandt

Well-known member
#15
I have dropped sendmail and installed postfix, not sure it would make much of a difference here, but just in case. Still no luck.


I appreciate the help, unfortunately neither option will work for me. The only thing I can think of is I am overlooking a very simple typo, however after checking over and over, I don't believe I am. Any other suggestions?
Does the default work ?
 

ENF

Well-known member
#17
I'm out of suggestions, it's probably time to poke Kier or Mike to see if there is anything else that could be missing.

XenForo needs a logging bin for mail server issues. Or, a test mail option that reports back the result.

In the current state, we can't even tell if XenForo is even attempting to authenticate to Google's SMTP service.

I've looked at this in every way possible and cannot pinpoint anything specifically. I'm still learning the XenForo structure; I don't know it nearly as well as VB (yet).
 

Mike

XenForo developer
Staff member
#20
We could definitely use debugging for this. I did tests with my Gmail account and didn't have any issues sending, but I did routinely make a mistake entering the options. :)