nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

add email integration

Open nachoparker opened this issue 9 years ago • 18 comments

Probably postfix, to be able to send notification emails for activity, password resets and such

This can be a nice first contribution if somebody is up to it

nachoparker avatar Aug 23 '17 12:08 nachoparker

isn't this a built-in feature of nextcloud?: https://docs.nextcloud.com/server/12/admin_manual/configuration_server/email_configuration.html

Rufio87 avatar Aug 24 '17 07:08 Rufio87

Hi,

I would like that we investigated this a little bit to provide support. Maybe we'll end up using the PHP method, maybe we'll end up using postfix, which is recommended.

In any case, at the very least we will need to have some sendmail preinstalled, and probably some preconfiguration.

It would be nice that out of the box, everything is installed and configured for NCP to be able to send emails.

Thoughts?

nachoparker avatar Aug 24 '17 09:08 nachoparker

afaik if you want to use php/sendmail mail it is necessary to have an installed and working email system on your server.

so as NCP is designed for newbies and noops like me who of us does actually HAVE such a fully installed and working emailsystem? so i'd prefer to sent up smtp as a first step... but then again: who of us noobs does know the credentials to put in if you ask for imap or post3/smtp?

but if you want to provide us newbies with a fully working email system on our raspis - i really would like to have that as well... :D

JimmyKater avatar Aug 24 '17 10:08 JimmyKater

A fully working email-capable nextcloud would be great !

However, according to the documentation,

Nextcloud does not contain a full email server, but rather connects to your existing mail server. You must have a functioning mail server for Nextcloud to be able to send emails. You may have a mail server on the same machine as Nextcloud, or it may be a remote server.

So yep, @nachoparker you'll need to also preinstall and configure an email server or program of some sort for this to be pulled off :)

ObfuscateTheWeb avatar Aug 25 '17 09:08 ObfuscateTheWeb

Implemented v0.26.16

nachoparker avatar Sep 06 '17 18:09 nachoparker

How do we use it?

ObfuscateTheWeb avatar Sep 07 '17 00:09 ObfuscateTheWeb

Well, you can send a test email to yourself from the settings/admin/additional section. You need to have an email in your admin personal profile.

Also if a user loses a password you can receive an email to reset it, provided the user has set up an email in his/her personal profile.

Also notifications can be sent to emails like when you share directories, probably other things as well and more that might come in the future.

nachoparker avatar Sep 07 '17 07:09 nachoparker

Please put in the instructions an example for using gmail to send notifications etc., filling in the actual form at

https://ourdomain.noip.com/index.php/settings/admin/additional

All fields, as for an ordinary gmail user, not some Linux expert who runs their own SMTP server on their Linux box and knows all these answers already. So, for example, in the "From address" fields, do we make_up a desired name, like OurNextCloud @ ourdomain.noip.com, or must we put in our real gmail address, e.g. [email protected] ? And what encryption, server address, port number, etc., and do we check "Authentication required" or not, etc.?

Please repeat the above for any other email servers that have many posts on various forums etc. with obvious frustrations with the lack of clear instructions for filling out this web page. Of course, you can't be expected to do every such server, but the most-common 2 or 3 examples would help many lost users.

Thanks, and I hope you find in this post some useful info about how lost we noobs are.

JimBobHarris avatar Nov 14 '17 21:11 JimBobHarris

@JimBobHarris I don't have a gmail account to test with but please have a look here: https://support.google.com/mail/answer/7126229?hl=en You should try your real mail address like [email protected], use SMTP with authentification enabled (try cleartext from the drop down menu), STARTTLS on Port 587, and use smtp.gmail.com as a server. Also (quoted from the link):

Step 1: Check that IMAP is turned on
On your computer, open Gmail.
In the top right, click Settings Settings.
Click Settings.
Click the Forwarding and POP/IMAP tab.
In the "IMAP Access" section, select Enable IMAP.
Click Save Changes.

DKX47 avatar Nov 17 '17 09:11 DKX47

if anyone configures this successfully, it would be benefitial to share the steps with us so we can write them on the wiki.

I use PHP method and don't have a gmail account, so cant help

nachoparker avatar Nov 17 '17 09:11 nachoparker

It seems I got it to work, thanks to links and info from Daniel Krebs and others. Here are my entries at ...settings/admin/additional:

Send mode: SMTP Encryption: STARTTLS

From address: james.bob.harris @ gmail.com

Authentication method: Login [checked] Authentication required

Server address: smtp.gmail.com : 587

Credentials: [email protected] [my normal gmail login password] [Store credentials] (clicked)

Thanks again; I will test further with my actual nextcloudpi system and try to cause it to generate email from the system; I will report success or failure; others may get to it before I do.

JimBobHarris avatar Nov 22 '17 02:11 JimBobHarris

I verify the right entries are in JimBobHarris comment.

Update 1: I use google 2-factor authentication so I had to create a new application password in google settings and use this one instead of my normal password

Pant avatar Nov 22 '17 08:11 Pant

thanks @Daniel-Krebs @Pant and @JimBobHarris

you can generate a test email from the admin/other settings section. Once we verify this, it would be good to add it to the wiki.

also it is interesting to cover 2 factor authentication

nachoparker avatar Nov 22 '17 08:11 nachoparker

I have successfully sent an email to myself, from the test mail section. So I verify this.

Pant avatar Nov 22 '17 08:11 Pant

awesome, can someone add this to the wiki please? @Daniel-Krebs or @Pant ?

nachoparker avatar Nov 22 '17 14:11 nachoparker

I agree the "Send email" button in .../settings/admin/additional sent me an email, but I have yet to figure out some artifice to cause the System to actually initiate and send an email to a User. I tried changing a test User's Limit to 2 MB and they have way more than that in use, but no emails were triggered. Any suggestions?

JimBobHarris avatar Nov 22 '17 18:11 JimBobHarris

I don't know myself.. you might get more ideas in the nextcloud forums

I do recieve emails on activity, like shared links

nachoparker avatar Nov 23 '17 02:11 nachoparker

@Pant wrote a guide on the wiki

https://github.com/nextcloud/nextcloudpi/wiki/Email-settings

Thanks!

nachoparker avatar Nov 23 '17 14:11 nachoparker