Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: letterman7 on October 14, 2017, 06:08:29 PM

Title: The basics.. setting up an email system for members
Post by: letterman7 on October 14, 2017, 06:08:29 PM
Be kind.. I'm still swimming in the pool trying to find the ladder in the SMF functions. I had one of my forum members email me through the forum. I never got it. So I tried it myself, and again, it never showed. Then it dawned on me that hey.. I probably never set that part of the function up figuring it "self-installed" when I loaded the forum software. I'm using 2.0.14, hosted through NameCheap through their cPanel extension (which in itself drives me nuts). I found the mail settings in the forum admin section but have absolutely no idea where to start so that forum members can email forum members, not just myself...
Title: Re: The basics.. setting up an email system for members
Post by: Jailer on October 14, 2017, 09:36:14 PM
I use mailgun (https://www.mailgun.com/) for my forum. Works great and have had no issues. It's a small private forum so I don't need to worry about any limits. They have setup instructions on their site.
Title: Re: The basics.. setting up an email system for members
Post by: letterman7 on October 14, 2017, 10:02:39 PM
Ok, interesting. So an SMF forum needs a separate email host rather than the host for the site? Seems a little odd, but I'll investigate. Thanks.
Title: Re: The basics.. setting up an email system for members
Post by: Sir Osis of Liver on October 15, 2017, 12:00:53 AM
Is your forum sending any emails successfully?
Title: Re: The basics.. setting up an email system for members
Post by: aegersz on October 15, 2017, 04:20:30 AM
I had the same issues. The way to deal with this is to carefully monitor your mail LOG.

Google your mail server "hardening" for details about open relay avoidance.

I don't use SMTP so I go PHP - see my settings.

if you are not monitoring your log and searching on errors then you are running blind.
Title: Re: The basics.. setting up an email system for members
Post by: Kindred on October 15, 2017, 05:20:42 AM
Aegersz, your suggestions are rather specific to your unusual and uncommon configuration of a server...  which means that its not really a good answer to most people's questions.

Letterman, it depends on your host configuration... but smf can use phpmail or a configured smtp mail server...
As sir osis asks... has you forum ever sent emails? Like forum notifications of new posts, new PMs or new users?
Title: Re: The basics.. setting up an email system for members
Post by: letterman7 on October 15, 2017, 02:17:27 PM
No, I've never received any notifications of new posts, new members signing up, nothing. I was on with a tech from the hosting side and they said it was something on the forum side. My feeling is they didn't know and just wanted to pawn it off, but I figure I'd check here anyway.

Since NameCheap uses cPanel as a gateway to ftp files and whatnot, what should I be looking for in terms of a mail setting? I currently have (1) mail address that is the default for my personal mail.. I"m feeling like I need to set up an "account" or mail address just for the forum itself.
Title: Re: The basics.. setting up an email system for members
Post by: a10 on October 15, 2017, 03:18:44 PM
Your administrator profile, got a valid, tested and working email address?

Admin > mail > settings > mail type
What's the setting ?

Anything in queue ? If queue not enabled, enable it and make the forum send some mails, monitor the queue to see if they appear.






Title: Re: The basics.. setting up an email system for members
Post by: Illori on October 15, 2017, 04:40:22 PM
https://wiki.simplemachines.org/smf/E-Mails_-_Why_are_members_not_getting_emails_sent_from_the_forum
Title: Re: The basics.. setting up an email system for members
Post by: letterman7 on October 15, 2017, 06:04:57 PM
Quote from: a10 on October 15, 2017, 03:18:44 PM
Your administrator profile, got a valid, tested and working email address?

Admin > mail > settings > mail type
What's the setting ?

Anything in queue ? If queue not enabled, enable it and make the forum send some mails, monitor the queue to see if they appear.

There was a lot in queue, and it was enabled. Nothing was ever sent out since the forum inception it seems. I've cleared the queue until I figure this out.
The admin setting is screenshotted in the opening remark. Currently set as php
Title: Re: The basics.. setting up an email system for members
Post by: letterman7 on October 15, 2017, 06:08:18 PM
Quote from: Illori on October 15, 2017, 04:40:22 PM
https://wiki.simplemachines.org/smf/E-Mails_-_Why_are_members_not_getting_emails_sent_from_the_forum

Will give that a shot. There were several error messages, but nothing specific other than "email could not be sent to xxxxx".

Ok.. did that wiki test and instead of getting an email, I got a new window that opened up with code - see screenshot. Note the web address at the top of the open screen.
Title: Re: The basics.. setting up an email system for members
Post by: a10 on October 15, 2017, 07:07:50 PM
Quote from: letterman7 on October 15, 2017, 06:04:57 PM

There was a lot in queue, and it was enabled. Nothing was ever sent out since the forum inception it seems. I've cleared the queue until I figure this out.
The admin setting is screenshotted in the opening remark. Currently set as php
So the mail setting is not like the screenshot, but set to php default.

I had one of my forum members email me through the forum. I never got it -\- where to start so that forum members can email forum members
& later
Nothing was ever sent out since the forum inception it seems.

Just to be sure what's going on...
You receive the normal forum emails (notifications etc), it's -only- the 'member to member' that fails? Or you receive nothing at all and all is stuck in queue?
Title: Re: The basics.. setting up an email system for members
Post by: aegersz on October 15, 2017, 07:52:32 PM
I was looking at your SMTP settings and although i don't use them as I host a mail server on the same box, you may or may not you need a user and a password on port 25 so read on ...

what happens when you send an external email (from gmail) to the nominated email server ? how do you see them ? i would start there.

i know my suggestions may seem a little unhelpful because i am relatively new to internet systems but i'd still like to be able to help.

do you have an interface to this hosted email server and can you reply back to the above mentioned test email ?

does it use port 25 ?
Title: Re: The basics.. setting up an email system for members
Post by: letterman7 on October 15, 2017, 08:35:13 PM
Quote from: a10 on October 15, 2017, 07:07:50 PM
Quote from: letterman7 on October 15, 2017, 06:04:57 PM

There was a lot in queue, and it was enabled. Nothing was ever sent out since the forum inception it seems. I've cleared the queue until I figure this out.
The admin setting is screenshotted in the opening remark. Currently set as php
So the mail setting is not like the screenshot, but set to php default.

I had one of my forum members email me through the forum. I never got it -\- where to start so that forum members can email forum members
& later
Nothing was ever sent out since the forum inception it seems.

Just to be sure what's going on...
You receive the normal forum emails (notifications etc), it's -only- the 'member to member' that fails? Or you receive nothing at all and all is stuck in queue?

Nobody receives anything. It's all stuck in the queue (or was, until I cleared the queue).
Quote from: aegersz on October 15, 2017, 07:52:32 PM
I was looking at your SMTP settings and although i don't use them as I host a mail server on the same box, you may or may not you need a user and a password on port 25 so read on ...

what happens when you send an external email (from gmail) to the nominated email server ? how do you see them ? i would start there.

i know my suggestions may seem a little unhelpful because i am relatively new to internet systems but i'd still like to be able to help.

do you have an interface to this hosted email server and can you reply back to the above mentioned test email ?

does it use port 25 ?
According to cPanel, the host would have to open the port to use any SMTP settings. They suggested to keep everything at the php as it would reduce any issues.. clearly that's not the case. I'm not sure what you mean by the 'nominated mail server'? I, too, am very green when dealing with hosting, php, etc... so some of the nomenclature totally escapes me.
Title: Re: The basics.. setting up an email system for members
Post by: aegersz on October 15, 2017, 08:49:58 PM
i think PHP only works when you run SMF on the same box as the mail server, which you don't (from what i can tell).

so you have to use SMTP via a specific port to talk to your mail server which will act as a relay for your box.

please ask your host if they work as a RELAY for your host SMF box (via it's domain name). They may not act as a relay or may have to change their config to accept email via SMTP from the server hosting SMF (via their permitted networks or whatever).

explain to them that you cannot contact their email host and need to do so. They have to give you the server name or IP, the port and any user names and passwords ... then once that is done, you select SMTP and plug that info into SMF SMTP email settings
Title: Re: The basics.. setting up an email system for members
Post by: letterman7 on October 16, 2017, 07:29:45 AM
Will give that a try, aegersz! I'll contact them today.
Title: Re: The basics.. setting up an email system for members
Post by: a10 on October 16, 2017, 10:49:22 AM
So all mails are generated by the forum, then all (incl notifications etc etc) are stuck in queue. Settings is PHP default. Quote from the SMF mail help:
"You don't need to fill in the SMTP settings if this is set to PHP's default."
(which is like the 10 years old setup on my forum, never touched it after that and mail has worked perfect ever since).

Looks like everything is fine on the forum side so far. The host should investigate, starting by making then postitively \ clearly confirming \ testing that php mail is enabled and properly set up from their side.
Title: Re: The basics.. setting up an email system for members
Post by: aegersz on October 16, 2017, 05:05:26 PM
a10, from what I can tell, his server doesn't have a local mail server so php cannot send the emails.

I could be wrong but he has to use his host's external server and that is why SMTP is supported.

he can use SMTP to contact a mail relay which will then forward the mail to the correct recipient but won't be able to receive mail as his domain DNS probably doesn't have MX configured.

he will have to check for emails on the host's email server to access any received emails ... whatever his email address is would confirm this.

SMF only sends mail and that is fine because people can register via HTTP.

Notifications are send only.

I could be totally wrong but this is how I see it.

my only confusion is how his members register because that is done via email to send the activation links ... perhaps he registers them himself or guests can post ?

Letterman, make sure that if a member in your forum wants to be emailed then give them option to do so ... sorry but I forgot where to set that default for all members. once a member is emailed by another member then SMF will send that initial email and any other email correspondence between them will be done outside SMF via their personal emails.
Title: Re: The basics.. setting up an email system for members
Post by: a10 on October 16, 2017, 05:28:30 PM
Quote from: aegersz on October 16, 2017, 05:05:26 PM
a10, from what I can tell, his server doesn't have a local mail server so php cannot send the emails.

my only confusion is how his members register because that is done via email to send the activation links ... perhaps he registers them himself or guests can post ?

Indeed there are mysteries. Doesn't all 'normal' hosts provide php email? And the members activation... let's see if the op can provide detailed info how the forum is run, and investigate the host's email capabilities (or lack thereof).
Title: Re: The basics.. setting up an email system for members
Post by: Kindred on October 16, 2017, 05:33:37 PM
Most hosts have the php sendmail component
Title: Re: The basics.. setting up an email system for members
Post by: aegersz on October 16, 2017, 05:43:31 PM

[root@forum ~]# dig MX ultravan.com       
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.4 <<>> MX ultravan.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39441
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;ultravan.com.                  IN      MX
;; AUTHORITY SECTION:
ultravan.com.           1799    IN      SOA       dns1.name-services.com. dns1.name-services.com.ultravan.com. 1461638364 172800 900 1814400 3600

;; Query time: 82 msec
;; SERVER: 2001:4860:4860::8844#53(2001:4860:4860::8844)
;; WHEN: Tue Oct 17 05:45:58 2017
;; MSG SIZE  rcvd: 108


confirmed - his domain name isn't configured to receive emails so that makes me think that he is not given access to local email services.

if he wants to receive mail via his domain name then he has to ask his host to configure his DNS settings for their email server.
Title: Re: The basics.. setting up an email system for members
Post by: letterman7 on October 16, 2017, 08:54:47 PM
Ok, problem apparently solved. It stemmed from the cPanel component. It seems that while yes, there is/was a php component active, it actually needed a mail address to direct from. Setting up the site and hosting it automatically provided a default address, but I needed to add another address for the site to access. Makes no sense to me, but neither does tiptoeing through cPanel. So.. hopefully the issue is solved.. it worked when I tested on my own address and another member's. We'll see in the long run if I receive notifications or not.

Thanks for helping troubleshooting though - I'm learning, albeit at a slow rate!

Rick