Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2015-03-09 14:23:28

Herbert95
Member
Registered: 2015-03-09
Posts: 7

Problem with Options -> Email

Hello,
I'm using FluxBB v.1.5.8 . After setting up the right Email-Settings under Options->Email in the administration panel and activating Options->Registration->Verify registrations, I've got the following issue: If someone try to register for the forum, an error shows up: "Could not connect to smtp host "smtp.1und1.de:465" (110) (Connection timed out)."
Yes, the server settings have the right values. Using the same settings I can add this email account to Thunderbird without any problems.

I've already read the following forums:
fluxbb.org/forums/viewtopic.php?id=7643
fluxbb.org/forums/viewtopic.php?id=8051
But none of them delivers a solution that works.

Is this a bug of FluxBB? Can someone give me an advice?

Offline

#2 2015-03-09 16:24:28

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: Problem with Options -> Email

Could you post the details you're using for clarification what you're doing is definitely right? (Obviously * out your password though)

Based on the latter topic you viewed, I believe it's a hosting environment specific issues, though I may be wrong and could just as easy be another issue at fault. This issue does not occur on my new host, and it did on my old.

Who is your hosting provider?

Offline

#3 2015-03-09 17:35:40

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,200
Website

Re: Problem with Options -> Email

In FluxBB v.1.5.7 work email?

Offline

#4 2015-03-09 17:54:12

Herbert95
Member
Registered: 2015-03-09
Posts: 7

Re: Problem with Options -> Email

My Provider is hosting.1und1.de. I'm using PHP 5.5 and MySQL 5.1.
This are the settings, I use:

SMTP server address: smtp.1und1.de:465
SMTP username: [Webmaster email]
SMTP password: *********
Encrypt SMTP using SSL: Yes

Last edited by Herbert95 (2015-03-10 10:34:02)

Offline

#5 2015-03-09 17:57:36

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: Problem with Options -> Email

Do you have an SSL cert? If that's a SMTP address owned by your hosting provider given to your account, and you don't have an SSL certificate yourself, I wouldn't have thought it would work in that way.

In addition trying to remove the specified port will force it to run on the default. I'd also check and make sure the default port (25) isn't blocked by your hosting provider.

Last edited by chris98 (2015-03-09 18:00:12)

Offline

#6 2015-03-09 21:33:43

Herbert95
Member
Registered: 2015-03-09
Posts: 7

Re: Problem with Options -> Email

The used email account requires a SSL connection for IMAP, for SMTP it is only recommended as far as I know. I tried it without enabling SSL in the options and it still does not work. Then I also removed the specific port declaration: No success.
In the help center of 1und1 (hilfe-center.1und1.de/e-mail-und-office-c82645/1und1-e-mail-adresse-c82704/bedienung-c82755/einstellungen-fuer-ihr-e-mail-programm-a783411.html) the following ports are recommended for non-SSL connections: 587 and 25; So I also tried "smtp.1und1.de:587". No success too.

Offline

#7 2015-03-10 08:28:00

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: Problem with Options -> Email

If I've translated this correctly, then this is only if you want to use SSL:

http://hilfe-center.1und1.de/e-mail-und-office-c82645/1und1-e-mail-adresse-c82704/bedienung-c82755/einstellungen-fuer-ihr-e-mail-programm-a783411.html wrote:

Verwenden Sie für eine sichere Übertragung Ihrer E-Mails die SSL-Verschlüsselung.

Create a new page on your site, and put this as your content:

<?php phpinfo(); ?>

Open it with your browser, then check and make sure fsockopen is enabled. If it's not, that's the issue. Otherwise, try this: (not tested but should work)

<?php
$host = 'smtp.1und1.de';
$port = '25';

$fp = fsockopen($host, $port, $errno, $errstr, 5);
if (!$fp)
    echo 'Port is closed or blocked. Errno [ '.$errno.' ] Error: '.$errstr;
else
{
    echo 'Port is open and available';
    fclose($fp);
}
?>

Try a few different ports, the same that you've been connecting to. If any are blocked, then that could be another issue. It could also help by turning on error reporting when you're trying to connect to the SMTP server, if any warnings or notices are picked up, they'll be immediately give to you through the browser. There are clearly no fatal errors because you would have been given them already.

The code above will also time out after 5 seconds, to avoid using all your system resources up - to make this timeout longer, change the 5 to a higher number.

Last edited by chris98 (2015-03-10 08:33:19)

Offline

#8 2015-03-10 09:12:23

Herbert95
Member
Registered: 2015-03-09
Posts: 7

Re: Problem with Options -> Email

Thanks! I could not find "fsockopen" in the phpinfo.
Then I tried your second code snippet for port 25 and for port 587. Both delivered the same error:

Port is closed or blocked. Errno [ 110 ] Error: Connection timed out

Is this provider specific or are there some settings that I can change?

Offline

#9 2015-03-10 09:16:54

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: Problem with Options -> Email

If you're on a shared server, it's provider specific and there is probably nothing you can do as it's your host that configures it. However, if you are using your own hosting environment (as in a VPS or dedicated server), it's likely you may have a bit more influence over the conditions.

If the ports are suppose to be open, even if you're on a shared server, your host may have made a simple mistake - perhaps it's worth talking to them about it.

Last edited by chris98 (2015-03-10 09:17:25)

Offline

#10 2015-03-10 10:29:10

Herbert95
Member
Registered: 2015-03-09
Posts: 7

Re: Problem with Options -> Email

Ok I will contact my provider.

One issue I cannot understand is why the email account works in Thunderbird without any problems with port 587. So the port is open, but not for web applications. Am I right?

Offline

#11 2015-03-10 10:43:36

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: Problem with Options -> Email

The email system itself is different from using it in web applications, you're right - the web system that you're using is clearly running somewhere else, for example through a cPanel interface which is under a different set of rules to what your email account is under, possibly even a different server altogether- or at least that's what I think is the most likely reason.

Maybe the email server is under a different ISP to your own site too, and the one that you have has blocked port 25 (not uncommon, many ISPs block that port due to abuse) there are many different possibilities.

Anyway, good luck. smile

Last edited by chris98 (2015-03-10 10:44:23)

Offline

#12 2015-03-10 10:44:47

Herbert95
Member
Registered: 2015-03-09
Posts: 7

Re: Problem with Options -> Email

Thanks for great support! smile

Last edited by Herbert95 (2015-03-10 10:45:05)

Offline

#13 2015-03-11 09:28:42

GWR
Member
From: Germany
Registered: 2010-08-06
Posts: 194

Re: Problem with Options -> Email

According to the web 1und1 set their smtp-servers to require SSL. So you will have to use this then.

Did you check the response of the "sample" Chris98 provided when using port 465? Is the connection timed out - or refused then?

refused: we just need to check if SSL is available for you
timed out: your shared host cannot reach the desired port ...

In the case of "timeouts" you could open a ticked at the 1und1 support - because this means your shared hosting account cannot reach one of the needed ports of the smtp-server. Read: you will then not be able to send via "smtp".

What surely will work is just using "SendMail()" (the command in php) because this is often enabled then...


Edit: If you copy the sample code to a file and run it locally, you will see, that the smtp server is reachable! (php testfile.php - or put it in your local (x|l|w)ampp-installations htdocs to test it via localhost/testfile.php).


Deutsch:
------
Versuche mal den Beispielcode von Chris mit dem Port 465 zu Verwenden - kommt da ein TimeOut oder ein Refused? TimeOut = smtp server auf diesem Port nicht von Dir erreichbar. Refused = SSL-Einrichtung korrigieren (bzw ueberhaupt erstmal im PHP konfigurieren).

Dass dein Emailprogramm auf dem PC funktioniert, liegt daran, dass DEIN Rechner kein Problem damit hat, sich mit dem Server zu verbinden. Der Shared Host hingegen kann ja die ausgehende Verbindung schon blockieren (koenntest Du ueberpruefen, in dem Du bspweise den SMTP-Server einer GMX/Web.de-Adresse ausprobierst - solange die noch ohne SSL funktionieren)
------

My assumption is, that smtp-access is blocked for shared hosting in your case - and will only be available via "sendmail".

bye
Ron

Last edited by GWR (2015-03-11 09:31:52)

Offline

#14 2015-03-11 16:46:31

Herbert95
Member
Registered: 2015-03-09
Posts: 7

Re: Problem with Options -> Email

Thanks for the detailed explanation!
Trying out PunBB, I found a solution (hope it works for FluxBB as well). I've only insert the Webmasters mail address and no access data (like smtp server, username, password) on the options page.
For whatever reason it works!
Maybe it works because the forum is set up on a sub domain of the domain that provides Webmasters Mail address. I never thought that no access data is required in my case because I use a shared server.

Last edited by Herbert95 (2015-03-11 16:46:58)

Offline

#15 2015-03-11 17:50:40

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: Problem with Options -> Email

If you're just using the webmaster email, then you're using the local PHP mail program rather than an SMTP server.

It works just as well, but there are a few benefits of SMTP. For one, if someone checks the headers of the email sent, and know what they're doing, it would tell them your account username on the server. So suppose your directory was /home/xxx/public_html/ - they would see xxx (somewhere) in the email header.

SMTP sends it from a specified sender. It's also harder to identify who your hosting provider is, and you don't get a "sent via mail.whateversite.com" in the email content.

Last edited by chris98 (2015-03-11 17:51:49)

Offline

#16 2015-03-12 08:24:25

GWR
Member
From: Germany
Registered: 2010-08-06
Posts: 194

Re: Problem with Options -> Email

Similar to what chris98 described:
I already mentioned "sendmail" - this is what your setup now uses. Using "SMTP" is similar to using a specified email account. If your domain at 1und1 is "mydomain.de" you will send emails from "bla@mydomain.de" when using "sendmail". But if you use "smtp" you will send with whatever account you are using, so if you had an address at "mydomain@gmx.de" you would send with "mydomain@gmx.de" then - instead of "bla@mydomain.de".

For such setups this isnt that problematic, because most servers are configured properly and you will be able to just "sendmail". BUT ... imagine you installed XAMPP/WAMPP/LAMPP/... on your computer and now you want to try out registrations ... hmpf, no email gets send via sendmail() ...  because else everybody would be able to send out spam via his dynamic IPs.
Of course you could configure your local host correctly (else servers wont work ... and their sendmail then fails too). But the whole thing of MX records is something a normal "php dev" should not need to come in contact with (we have admins for it...).

Conclusion: without smtp-credentials "sendmail()" is used - and therefor the mail programme (in the sense of linux command line tools) of choice is used and you do not see the configuration "behind". With smtp-credentials the php engine tries to connect to the given smtp-server. In your case it seems that 1und1 blocks access to remote urls.

It might be interesting to see whether you can "curl" remote urls or ( get_content(url) ) because you then could simulate smtp-communication on your own ...


bye
Ron

Offline

Board footer

Powered by FluxBB