Search…

X3 Photo Gallery Support Forums

Search…
 
shoot_machine
Topic Author
Posts: 13
Joined: 14 Nov 2022, 07:54

Mail Setup

17 Nov 2022, 10:19

So, I'm in the stage to setup a new website with X3 (first on a trial basis) and can't get the contact form / the mail settings to work. Whatever SMTP settings I put in, it allways gives me a "SMTP connect failed". 
I, for sure, use the correct authorization data ( user login + password) for my hosts SMTP servers and tried different settings (tsl / ssl, port 465 / 587, with / without SSL verification), nothing worked: What can I do, is there any debugging or logs which help to identify the exact cause?
Thank you!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Mail Setup

17 Nov 2022, 11:14

Mail and SMTP can get complicated, because X3 can't send the email for you.
shoot_machine wrote:What can I do, is there any debugging or logs which help to identify the exact cause?
Yes. Open Chrome (or any browser) > view > developer > developer tools > console. Try to send, and the console will output the fail response from the SMTP server. Feel free to copy-paste response here. If you have a link, and can send to me in private message, I could check from here.
shoot_machine wrote:Whatever SMTP settings I put in, it allways gives me a "SMTP connect failed".
Yes, it would have to be the exact combination of settings, usually tls + port 587 for most SMTP services. What SMTP service is it? There is a chance that your SMTP server does not allow "relay", but most do, including Gmail.
 
shoot_machine
Topic Author
Posts: 13
Joined: 14 Nov 2022, 07:54

Re: Mail Setup

17 Nov 2022, 11:54

Thanks for your prompt reply. I've tested different settings and the Chrome console output is attached. With TLS at port 587 it gives only the error message "Failed to submit form. Check console" but there is no console output. My web hoster is German company IONOS and their recommend SMTP settings is TLS at port 465.
Attachments
TLS_465.GIF
TLS_465.GIF (23.43 KiB) Viewed 3915 times
SSL_587.GIF
SSL_587.GIF (51.62 KiB) Viewed 3915 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Mail Setup

17 Nov 2022, 22:54

The problem seems to be related to SSL on your server, as you can see in the error message. Either SSL extension is not installed, or it's an older version, or you are not using correct SSL/TLS/PORT setting.
shoot_machine wrote:My web hoster is German company IONOS and their recommend SMTP settings is TLS at port 465.
According to the three posts below, IONOS uses port 25 (not SSL), which would explain the SSL error you are getting.
https://reinwaldt.de/news-tipps/phpmail ... -bei-ionos
https://stackoverflow.com/questions/564 ... host-1and1
https://github.com/PHPMailer/PHPMailer/issues/1672
Code
Host: smtp.ionos.de
Port: 25
Encryption: STARTTLS
Authentification: true
Another posts claims it uses port 587 and TLS, but I am guessing the above is correct.
https://www.ionos.com/digitalguide/e-ma ... phpmailer/
 
shoot_machine
Topic Author
Posts: 13
Joined: 14 Nov 2022, 07:54

Re: Mail Setup

18 Nov 2022, 09:09

Unfortunately that doesn't get me ahead. Also with settings port 25 and TLS I receive only the error message "Failed to submit form. Check console" but there is no console output. Well, I get stuck here.
And SMTP is necessary at all? Asking as my still running old Koken installation works without and I actually wanted to replace it.
Thanks for your support.
Last edited by shoot_machine on 18 Nov 2022, 09:51, edited 1 time in total.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Mail Setup

18 Nov 2022, 09:47

Did you consider asking your hosting exactly what SMTP settings are required to send email from your website? X3 simply forwards those details, through the industry-standard PHPmailer. X3 (or any other web app) can't send emails for you ... It's done either from SMTP (recommended) or the server's own emailer (dodgy).
shoot_machine wrote:And SMTP is necessary at all? Asking as my still running old Koken installation works without and I actually wanted to replace it.
Did you try? Just disable SMTP option. SMTP is not strictly required, but in modern days, it's the recommended approach to avoid many issues (spam-sorted email, server blacklisting). Contact forms on your website will send email FROM you, TO you, on behalf of the person who fills the form. Therefore, the FROM (actual sender of the email) is important, and SMTP is often used.
shoot_machine wrote:Asking as my still running old Koken installation works without and I actually wanted to replace it.
X3 can of course send email on the same email options you have in your Koken, but I don't know what they are. If you are sending email without SMTP, it means your server has kept the localhost emailer enabled ... In this case, I am guessing they have some strict requirements that the FROM address must be from an email on the same domain.
 
shoot_machine
Topic Author
Posts: 13
Joined: 14 Nov 2022, 07:54

Re: Mail Setup

20 Nov 2022, 13:14

... In this case, I am guessing they have some strict requirements that the FROM address must be from an email on the same domain.
Thank you, that was the crucial hint. For some reason I had not tested this yet. But now sending also works via SMTP. Sometimes it's probably too simple ...  :slight_smile:. So I've finished the setup and republished my website meanwhile after buying the license.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Mail Setup

20 Nov 2022, 20:59

Alright :ok_hand: I probably should have mentioned this earlier.

Indeed, the FROM email address is technically very important for sending mechanisms.