Setting up Open Project email

12.6k views Asked by At

has anyone ever set up their open project email that the program comes with? Open Project is an open source program. I was just curious, lets say I set up my email settings, how do I test it to make sure it works? I am not sure what to be looking for.

Best

Mike

2

There are 2 answers

0
tessi On

Which version of OpenProject do you use? (I recommend to use the new version 3).

If you are on OpenProject 3, have a look at config/configuration.yml and doc/CONFIGURATION.md.

There you see a lot of email related options (especially the SMTP options might be useful for you). To enable these options, copy config/configuration.yml.example to config/configuration.yml and make your changes around line 103:

default:
  # Outgoing emails configuration (see examples above)
  email_delivery_method: :smtp
  smtp_address: smtp.example.net
  smtp_port: 25
  smtp_domain: example.net
  smtp_authentication: :login
  smtp_user_name: "[email protected]"
  smtp_password: "my_openproject_password"

(If you choose to provide environment variables instead (as described in CONFIGURATION.md) you don't need to copy the configuration.yml)

With these settings, your OpenProject installation should be able to send mails. If you are logged in as an administrator, you should visit the https://<your OpenProject instance>/settings?tab=notifications page. There are some useful settings and (at the bottom of the page) a 'send test mail' link.

You might find further help in the OpenProject forums - especially at this topic.

0
Thorsten Niehues On

I tried setting the parameters in the Admin -> Parameters page. I filled out SMTP Server, Port, Username and Password.

Unfortunately it is not working. This is the cmd_string in file acs-mail-lite-procs.tcl:

smtp::sendmessage ::mime::1 -originator bounce-36813-AE60A926C4ED8A784755AE1362497649C9565989-21457@AS02 -header {From [email protected]} -header {Reply-To [email protected]} -header {To [email protected]} -servers smtp.office365.com -ports 587 -username [email protected] -password PASSWORD

The error message is:

Error: member-notify: Error sending to "[email protected]": 530: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

Solution:

Since the forum of project-open and google is not very helpful I chose to setup our server to work with exchange like on this description: Configure Postfix to Use Gmail SMTP on Ubuntu (I think this solution works for most Email servers)

Then I added this line to the end of the ad_proc -public send method (also in the acs-mail-lite-procs.tcl file):

exec /web/projop/poSendEmail.sh $body $subject $to_addr

Finally the poSendEmail.sh script:

#!/bin/bash
# Call this script with parameter:
# $1 message content
# $2 mail subject
# $3 receipient (to field)
MSG=${1//\"/}
MSG=$(echo $MSG | tr -d '\r')
echo "Sending mail with parameter: $MSG, $2, $3" >> /web/projop/log/all.log
echo "$MSG" | mail -s "$2" -r [email protected] $3