Urgent SMTP help. No proposed solution works.

Started by AdRiAnIlloO, June 11, 2020, 07:22:54 PM

Previous topic - Next topic

AdRiAnIlloO

Hi,

I tried to set up SMTP for password recoveries to the users with Outlook (free account), and I couldn't make it work. Hence, I told my non-technical parter we should buy an e-mail from the company at which we also have a domain already (OVH company). Thanks to god I told him to try a single month payment first to make sure it works and, as I kinda was scared of same kind of problems would keep happening than the ones I got with free Outlook.

First of all, as an initial indicator to consider, it seems to use Outlook services. This is because the web-based client uses Outlook interface. Then, I proceed to expose the real trouble. After setting the correct parameters (type: SMTP, port 587, correct server & login credentials), I get the following error:

Error: 504 5.7.4 Unrecognized authentication type

This is one of the errors I also experimented when attempting with free Outlook account. So, the only solution I could find over SMF support forums was to add tls:// protocol prefix to the server, but upon testing to recover password again, the following error happens on logs instead:

Could not connect to SMTP host: 0 :

Could these kind of problems really require some internal PHP changes or something, maybe by a package? I didn't find the solution yet, and can't wait anymore. Thank you.

Best regards,
Adrián

Deaks

What server are you using? Have you tried other mail types like pop? If so are they working.  Also are your credentials correct?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

AdRiAnIlloO

#2
Server is pro2.mail.ovh.net [nofollow].
Yes, the credentials are correct.
I'm pretty confident there's some limitation of SMF with latest security mechanisms changes over last few years, for Outlook systems at least... The proposed solutions over forum (like adding tls://) are 5 or more years old.

EDIT: However, I've tried to set up SMTP on Outlook app using the aforementioned account and it seems it doesn't want to send emails with it (only web interface provided by OVH works). I'll talk with support as well.

vbgamer45

OVH might block SMTP or outlook might be blocking the OVH IP.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Deaks

well if you used them on outlook I can see why

try:
ssl0.ovh.net   outgoing port of 465


This information is from the OVH website.

Also adding: "No proposed solution works." to your title is quite childish and wont get you help any faster!
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

AdRiAnIlloO

#5
Thank you guys. Btw,

Quote from: Deaks on June 12, 2020, 10:29:04 AM
well if you used them on outlook I can see why

try:
ssl0.ovh.net   outgoing port of 465


This information is from the OVH website.

Also adding: "No proposed solution works." to your title is quite childish and wont get you help any faster!

Didn't work either... I had tried this before also. There are also instructions from OVH which say to use the TLS/583 setup as well: https://docs.ovh.com/ie/en/emails-pro/first-configuration-email-pro/#step-5-use-your-email-addresses [nofollow].

Furthermore, if I use the SSL/465 configuration in SMF, I get the following error:

Couldn't get mail server response codes

(All settings I've referred to which I've also tried in our SMF end, are using SMTP type). If I switch to PHP's, I get the error:

QuoteUnable to send mail to the email address '[email protected]'

I hope you understand it has been a very long stuck loop for me already, annoying (not blaming SMF, it's great!). Let's see what support says. I exposed there that settings don't even work in Windows 10 Mail for sending mail, but their web interface is fine.

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

AdRiAnIlloO

#7
Quote from: Deaks on June 13, 2020, 04:02:42 AM
Did you check this out:

https://docs.ovh.com/gb/en/emails/mail-configuration-windows-10/ [nofollow]

Yes, I tried that configuration too, even when it's related to the "MX Plan" (a more expensive service). OVH has to mail offerings, Mail Pro (cheaper) and that MX Plan.

When I use the following SMTP test tool, everything works perfectly: hxxp:www.smtper.net [nonactive]
I also introduced wrong password to double-check it isn't a scam (and it reported a failure in that case, as it should).

m4z

Quote from: AdRiAnIlloO on June 12, 2020, 07:18:31 AM
The proposed solutions over forum (like adding tls://) are 5 or more years old.

Have you tried these solutions or are you just assuming they don't work? Neither SMF nor the SMTP standard have changed much in that time.

I guess from your posts you use Mail Pro. If you look at Step 5 of the OVH "Email Pro" guide you posted above, it says to use (ssl://)prox.mail.ovh.net on port 587.
According to this SMF guide, using SSL/TLS on port 587 doesn't work, for reasons I don't know (but you should receive an SSL error message).

You could try sending mail directly via PHP on your server like described here.

The more details you provide (which exact combination of settings didn't work, and what error(s) did you receive?), the more people will be willing or able to help you. You want help, you have to describe exactly what you're doing. Mail is working fine for everybody else, so the problem is likely related to the OVH mail servers, or your (incorrect?) settings.

PS: If you entered your credentials on smtper, I suggest you change them, unless you trust their statement that they don't save them permanently.
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

AdRiAnIlloO

Quote from: m4z on June 13, 2020, 05:46:44 PM
Quote from: AdRiAnIlloO on June 12, 2020, 07:18:31 AM
The proposed solutions over forum (like adding tls://) are 5 or more years old.

Have you tried these solutions or are you just assuming they don't work? Neither SMF nor the SMTP standard have changed much in that time.

In my first post I clearly stated I tried adding exactly "tls://" prefix, read again please. I hope you realize then I have given almost as much details as possible.

Quote from: m4z on June 13, 2020, 05:46:44 PM
I guess from your posts you use Mail Pro. If you look at Step 5 of the OVH "Email Pro" guide you posted above, it says to use (ssl://)prox.mail.ovh.net on port 587.
According to this SMF guide, using SSL/TLS on port 587 doesn't work, for reasons I don't know (but you should receive an SSL error message).

I will surely try checking out current PHP mail code to see if that limitation you mention would allow for an easy change, or use that other full method.

m4z

Quote from: AdRiAnIlloO on June 14, 2020, 05:35:45 AM
Quote from: m4z on June 13, 2020, 05:46:44 PM
Quote from: AdRiAnIlloO on June 12, 2020, 07:18:31 AM
The proposed solutions over forum (like adding tls://) are 5 or more years old.

Have you tried these solutions or are you just assuming they don't work? Neither SMF nor the SMTP standard have changed much in that time.

In my first post I clearly stated I tried adding exactly "tls://" prefix, read again please. I hope you realize then I have given almost as much details as possible.

Yes, but you said "like adding tls://"; what else did you try? You're making us try to collect pieces of information from multiple posts and interpret what different statements might mean, instead of painting more complete pictures like:

  • "the ovh guide at [url] says to use the mailserver foo.bar.com
  • using the following values in SMF...
  • ...I see the following behavior and get the following error messages

Then I googled what the error meant, understood I have to enable SSL specifically, added the "ssl://" prefix, and the behavior and error message changed as follows: ...

Next, ..."

You did this kind-of well in your first post, although you didn't mention how you determined the server to be correct and you didn't mention the exact syntax you used, which might have mattered (we don't know up front how tech-savvy you are). And you're not explaining why you tried X next.

You mention you tried to use the credentials in "Outlook app" (whatever that is, don't know, don't care). This OVH doc seems to indicate that isn't possible, as Deaks already guessed.

Deaks put in time and effort to find a solution for you, and afterwards you tell him you already tried it.


Quote from: AdRiAnIlloO on June 12, 2020, 11:07:14 AM
Furthermore, if I use the SSL/465 configuration in SMF, I get the following error:

Couldn't get mail server response codes

This probably simply means (like their docs already stated) that there is no mail server running on that port.


Quote from: AdRiAnIlloO on June 12, 2020, 11:07:14 AM
(All settings I've referred to which I've also tried in our SMF end, are using SMTP type). If I switch to PHP's, I get the error:

QuoteUnable to send mail to the email address '[email protected]'

SMTP uses an external mail server; the (built-in) PHP option only works if your server (where SMF is running) is able to send mail, or if your external mail server doesn't require authentication (AFAIK), so SMTP probably is your only option unless you configure your server (outside of SMF, if you have shell or cpanel access) to use your mail account.


Next, Deaks tried to help you again, only to learn that you already tried that solution, too. If I was him, I'd probably quit helping at this point, because whatever possible solution he finds, he'll have to assume that you already tried it without telling us. So why bother?


Your next best guess is probably the PHP script, so go ahead. Maybe this will shed some light.
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

AdRiAnIlloO

m4z, I'll ignore you for now and concentrate in solving my issue, since you don't know how much anxiety you have generated to me, the affected guy which has showed enough respect in the whole thread. If you have a problem with me, you'd be better off just not answering. With that, you would save more than 2x time than any guy other who tried to help me, who you claim to have been "so affected" by me.

More info.: I just set up the mail account in Gmail Android app (so no unreliable SMTP tools involved anymore), and there it works perfectly. Concretely, it uses the following data:

- Server: pro2.mail.ovh.net [nofollow]
- Port: 587
- Security type: STARTTLS
- Correct login/pass credentials

Furthermore, even setting security to "None" still allowed mails to be sent. And for the sake of more combinations, if I try SSL/587 I get the message: "The security of e-mail is not guaranteed", and it won't let me go with it. Finally, the SSL/465 combination seems unhandled by the remote end (yes, makes sense since guides don't mention it for the used server).

Thanks in advance to anyone who has any other idea, while I keep investigating.

AdRiAnIlloO

Hey again.

So, I've followed this very interesting low-level approach using OpenSSL to check everything is in order in their remote end: https://meta.discourse.org/t/smtp-unrecognized-authentication-type-with-office-365/145830/2 [nofollow]

The analague output from my replicated test for my desired e-mail is the following:

250 CHUNKING
EHLO pro2.mail.ovh.net
250-pro2.mail.ovh.net Hello [81.202.236.251]
250-SIZE 104857600
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH GSSAPI NTLM LOGIN
250-8BITMIME
250-BINARYMIME
250 CHUNKING
AUTH LOGIN
334 VXNlcm5hbWU6
<base64 encoded login>
334 UGFzc3dvcmQ6
<base64 encoded password>
235 2.7.0 Authentication successful

Chen Zhen

The SMF 2.0 branch does not have the option for STARTTLS using port 587 by default.
It's only SMTP option is TLS using port 465. If you can set your SMTP host to use those settings it should work for you.

I do have a mod that adds the STARTTLS option to your SMF mail settings.
You can just ignore its other features if you do not wish to use them.
After installing it you will have to adjust your mail settings to use STARTTLS and port 587.

It's an option for you to try... if it doesn't work & you don't have a use for it then uninstall it afterward.

ref.
https://web-develop.ca/index.php?action=downloads;area=stable_smf_modifications;file=46


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

m4z

Very helpful info (that apparently isn't on the wiki), thanks!
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

AdRiAnIlloO

Per my investigation, I've also came across realizing SMF 2.0 doesn't have STARTTLS support for port 587.

I searched how SMTP code would be in SMF 2.1 and found out it apparently provided that missing support, so I added the following code inside smtp_mail function and everything worked:


// START SMF 2.1
// Send STARTTLS to enable encryption
if (!server_parse('STARTTLS', $socket, '220'))
{
return false;
}

// Enable the encryption
// php 5.6+ fix
$crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;

if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT'))
{
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
}

if (!@stream_socket_enable_crypto($socket, true, $crypto_method))
{
return false;
}

// Send the EHLO command again
if (!server_parse('EHLO ' . $helo, $socket, null) == '250')
{
return false;
}
// END START SMF 2.1


Right when coming to post here, I have just seen Chen Zhen's solving mod, so I'm going to use your package and revert the above code. Thank you.
Problem solved.

Advertisement: