News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Server Blacklisted for SMTP

Started by SaidJan, June 28, 2017, 01:53:20 AM

Previous topic - Next topic

SaidJan

I have set these, but still not recieving emails. I don't get any error log.

Set Mail type to:             SMTP
Set SMTP server to:         ssl://smtp.googlemail.com
Set SMTP port to:            465
Set SMTP username to:     ******@gmail.com
Set SMTP password to:     *******
Confirm the password
Save the settings.

I checked my forum url here https://mxtoolbox.com/blacklists.aspx and it says "We notice you are on a blacklist."
What should I do? Anyway to use gmail or yahoo mail?

outdoors-stuff

We've had the same problem. SMTP and gmail simply doesn't work as it seems SMF can't handle TLS (which gmail etc require for secure ports). (According to our our web hosting provider, but I've seen similar thoughts on other threads about mail failing in SMF elsewhere here). Trying different (less secure than TLS/SSL) settings currently, will have to see how it goes, but this does seem to be something SMF needs to get their head around if modern email requires TLS security to be enabled...

SaidJan

I used yahoo smtp, didn't work as well.

Shambles

Quote from: outdoors-stuff
... SMTP and gmail simply doesn't work as it seems SMF can't handle TLS ...

What a load of rubbish. I wonder how my site is working then.

outdoors-stuff

Quote from: Shambles on June 28, 2017, 01:53:03 PM
Quote from: outdoors-stuff
... SMTP and gmail simply doesn't work as it seems SMF can't handle TLS ...

What a load of rubbish. I wonder how my site is working then.

I don't know Shambles. I'm simply passing on the conclusion our web developers (who also host our site) came to after bashing their heads against a brick wall with it today - after I and the other technical member of our organisation have been bashing our heads against this for rather too long.

Perhaps you can tell us mere mortals what the magic sauce is to make it work - as nothing seems to work for us. (Or indeed plenty of other folks if I read other postings correct). Even a gmail addy that's only been used to access our google analytics account before - not actually sending or receiving any other emails doesn't work... So it can't be our email (tried too many options and addresses on that) Nor our server if a new gmail addy doesn't work. What else can it be but the forum?

But right now I'm just too fed up with it all - was just passing on what we've been told to someone who sounded like they were going around the start of the same head-bashing loop as we just have. Not intending to start any flames, I just want the *** thing to work!

Shambles

Just indulge me here...

In your Sources/Subs-Post.php file, locate this string and post the line of code that follows it:

Code (find) Select
// EHLO could be understood to mean encrypted hello...

SaidJan

Quote from: Shambles on June 28, 2017, 04:04:07 PM
Just indulge me here...

In your Sources/Subs-Post.php file, locate this string and post the line of code that follows it:

Code (find) Select
// EHLO could be understood to mean encrypted hello...

if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')
{
if (!server_parse('AUTH LOGIN', $socket, '334'))
return false;
// Send the username and password, encoded.
if (!server_parse(base64_encode($modSettings['smtp_username']), $socket, '334'))
return false;
// The password is already encoded ;)
if (!server_parse($modSettings['smtp_password'], $socket, '235'))
return false;
}
elseif (!server_parse('HELO ' . $modSettings['smtp_host'], $socket, '250'))
return false;
}
else
{
// Just say "helo".
if (!server_parse('HELO ' . $modSettings['smtp_host'], $socket, '250'))
return false;
}

Shambles


SaidJan

#8
Quote from: Shambles on June 28, 2017, 07:05:28 PM
Ok, give this a try:

https://www.simplemachines.org/community/index.php?topic=544856.msg3870010#msg3870010

You never know, it may make a difference

I tried it, didn't work.
So what that 'localhost' should be?
Because I'm using a free hosting website. So what should I use instead of localhost?

outdoors-stuff

I seemed to have the same settings too. Tried the code change (which I'm wary of as if it isn't fixed as a bug update in next version then I'll never remember to update again). But doesn't work. Mail still sits in mail queue forever when using ssl://smtp.gmail.com on port 465.

I don't see how I can conclude anything other than gmail doesn't work with SMTP. At least for us. If you get it working I simply don't understand how...

Shambles

If mail sits in your queue forever, I'm surprised your error log doesn't show a fault when you hit the "send mail now" link. Very surprised.

outdoors-stuff

I had given up on this and was going to get on with paid work, but tried it once again as know I've rarely pressed the send mail queue now button. So only fair to try again on that and make doubly sure.

(It's simply not a viable option for real world use as I am not going to sit over the forum all day in case someone sends a message that needs a button pressing - it HAS to work automatically or its no use at all!).

Error produced "Problems occurred while sending mail. Error: 535 5.7.8 https://support.google.com/mail/?p=BadCredentials v8sm923394wrd.28 - gsmtp"

But the email addy and password no different to sending via phpmail so I really don't believe I've typed it wrong (in fact I didn't change it at all).

Does that shed any light on what's going wrong? To me it suggests it's still an "SMF isn't secure enough for Gmail's excess liking these days" issue?

Shambles

@outdoors-stuff , the "send mail now" test was purely so you could get an error logged, which from what you say you did.

Do you have 2FA turned on, on the gmail account you tested?

SaidJan

This is an email I got in my NEW gmail with 2-step-verification OFF.





Now I should find out where to unblock it.

Edit: Ok, I turned on "Allow for less secure app". Now google says an app accessed your account, but still the user who requested for forgotten password, can't recieve it.

Illori

you click that link to allow access to less secure apps

SaidJan

Now it's unblocked, but user hasn't recieved any email.



Edit: Ok, finally fixed it with turning on that option. Thank you all for your help. ;)

outdoors-stuff

Quote from: Shambles on June 29, 2017, 09:27:20 AM
Do you have 2FA turned on, on the gmail account you tested?
Yes we do @Shambles and I did the application password thing for it that Google asked for. So it *shouldn't* be that. But who knows. I feel like I'm just going round the same loop time and time again but never getting out of it with SMTP. At least phpmail sends notifications now even if its very poor in some other respects...

SaidJan

Quote from: outdoors-stuff on June 29, 2017, 10:29:51 AM
Quote from: Shambles on June 29, 2017, 09:27:20 AM
Do you have 2FA turned on, on the gmail account you tested?
Yes we do @Shambles and I did the application password thing for it that Google asked for. So it *shouldn't* be that. But who knows. I feel like I'm just going round the same loop time and time again but never getting out of it with SMTP. At least phpmail sends notifications now even if its very poor in some other respects...

I tried it with both my yahoo and gmail account, didn't work.
I made a new gmail account, and after turning on "Less secure apps", it sends email with the same setting in the 1st post.
I think it just took 2-3 minutes to send out the email (not sure.)

Advertisement: