MyBB Community Forums

Full Version: MyBB was unable to send the email using the PHP mail() function.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(03-30-2018, 06:24 AM)effone Wrote: [ -> ]
Mail handler: SMTP mail
SMTP hostname: smtp.gmail.com
SMTP port: 465 (if doesn't work try 587)
SMTP username: [email protected]
SMTP password: *****
SMTP Encryption Mode: SSL (if port 465) / TLS (if port 587)

None of that worked

Unable to connect to the mail server with the given details. Reason: 101: Network is unreachable
Its not your settings. Its your GMail account prohibiting connectivity.
Tried enabling Less Secure App Allowance?
https://myaccount.google.com/lesssecureapps?pli=1
Nope still getting

Unable to connect to the mail server with the given details. Reason: 101: Network is unreachable

I tried both ports
On some shared hosts port 465/587 are blocked by default. Not sure about Namecheap though.
The settings provided is tested and working. Not recommended but try the last one with port 25 and "No Encryption".

Tried with Namecheap's own SMTP? if your hosting package provides mail service along with?
(03-30-2018, 06:47 AM)effone Wrote: [ -> ]On some shared hosts port 465/587 are blocked by default. Not sure about Namecheap though.
The settings provided is tested and working. Not recommended but try the last one with port 25 and "No Encryption".

Tried with Namecheap's own SMTP? if your hosting package provides mail service along with?

Didn't work. Can I maybe get PHP Mail to work?

IDK If this is helpful but here https://www.namecheap.com/support/knowle...le-devices
Brian. Your PHP Mail not working, SMTP not working ....
May be its time to knock the door of your hosting provider ...
(03-30-2018, 06:59 AM)effone Wrote: [ -> ]Brian. Your PHP Mail not working, SMTP not working ....
May be its time to knock the door of your hosting provider ...

Haha ok thanks for your help anyway.
(03-30-2018, 07:00 AM)Brian. Wrote: [ -> ]
(03-30-2018, 06:59 AM)effone Wrote: [ -> ]Brian. Your PHP Mail not working, SMTP not working ....
May be its time to knock the door of your hosting provider ...

Haha ok thanks for your help anyway.

A shared host has to enable php mail on the server, for obvious reasons, they’re probably hesitant to do so.

Else (You’re on a VPS/Dedicated server) you’ll have to install the PHP extension yourself, or relay through a provider. I wouldn’t use your personal email to send from. That’s literally asking for trouble. Internally, we use Mailgun. Whether or not it’s suitable for MyBB I don’t know - but it’s an option to look into. It would be trivial to make a plugin to support Mailgun/Mandrill/other sending services.
(03-30-2018, 08:25 AM)Ben Cousins Wrote: [ -> ]
(03-30-2018, 07:00 AM)Brian. Wrote: [ -> ]
(03-30-2018, 06:59 AM)effone Wrote: [ -> ]Brian. Your PHP Mail not working, SMTP not working ....
May be its time to knock the door of your hosting provider ...

Haha ok thanks for your help anyway.

A shared host has to enable php mail on the server, for obvious reasons, they’re probably hesitant to do so.

Else (You’re on a VPS/Dedicated server) you’ll have to install the PHP extension yourself, or relay through a provider. I wouldn’t use your personal email to send from. That’s literally asking for trouble. Internally, we use Mailgun. Whether or not it’s suitable for MyBB I don’t know - but it’s an option to look into. It would be trivial to make a plugin to support Mailgun/Mandrill/other sending services.

We use shared hosting.
(03-30-2018, 08:35 AM)Brian. Wrote: [ -> ]
(03-30-2018, 08:25 AM)Ben Cousins Wrote: [ -> ]
(03-30-2018, 07:00 AM)Brian. Wrote: [ -> ]
(03-30-2018, 06:59 AM)effone Wrote: [ -> ]Brian. Your PHP Mail not working, SMTP not working ....
May be its time to knock the door of your hosting provider ...

Haha ok thanks for your help anyway.

A shared host has to enable php mail on the server, for obvious reasons, they’re probably hesitant to do so.

Else (You’re on a VPS/Dedicated server) you’ll have to install the PHP extension yourself, or relay through a provider. I wouldn’t use your personal email to send from. That’s literally asking for trouble. Internally, we use Mailgun. Whether or not it’s suitable for MyBB I don’t know - but it’s an option to look into. It would be trivial to make a plugin to support Mailgun/Mandrill/other sending services.

We use shared hosting.

Support posts aren't just a self-serving thing, hence my comment.

I refer you to the first part of my post:

Quote:A shared host has to enable php mail on the server, for obvious reasons, they’re probably hesitant to do so.

Get in touch with your host. They'll either unblock an SMTP port, making GMail work, OR they'll install the PHP mail() extension.
Pages: 1 2 3