1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Project Web Email Configuration

In order to send email from the new project web, you need to do the following configuration steps:

  1. Configure your project's email password.

For classic projects:

  • Use the Project Admin / Features menu choice and choose "Manage" from the "Project Web" line.
  • Set the password you want to use in the provided text entry and press the "Set Passwords" button.

For upgraded/Allura projects:

  • In your project admin, tools area, add the "PRWebeEmail" tool
  • Click the "Admin Project Web Outgoing Email" option on that tool
  • Set the password you want to use
  1. Configure your project web scripts to access our email server via either TLS or SSL SMTP using the following settings:
    • host: prwebmail (or ssl://prwebmail)
    • port: 25 (or 465 for ssl)
    • user: YOUR_PROJECT_NAME
    • password: THE_PASSWORD_YOU_CONFIGURED_FOR_YOUR_PROJECT
  2. Be sure to set the permissions on file that contains your password to not be world readable:
    • chmod o-r whatever.php

General Hints

  • If you see an error about the smtp server not supporting authorization, you are accessing port 25 without TLS. Unencrypted connections are not supported.
  • If you see an error about email relay not being supported, you didn't specify the right user (project) & password credentials.

Example Code

Here are a couple examples of how to configure email for project web. These examples use TLS via the normal port 25, but various software might be more easily configured to use ssl access via port 465.

Example for php

<?php

include('Mail.php');

$recipients = array( 'someone@example.com' ); # Can be one or more emails

$headers = array (
    'From' => 'someone@example.com',
    'To' => join(', ', $recipients),
    'Subject' => 'Testing email from project web',
);

$body = "This was sent via php from project web!\n";

$mail_object =& Mail::factory('smtp',
    array(
        'host' => 'prwebmail',
        'auth' => true,
        'username' => 'YOUR_PROJECT_NAME',
        'password' => 'PASSWORD', # As set on your project's config page
        #'debug' => true, # uncomment to enable debugging
    ));

$mail_object->send($recipients, $headers, $body);

Example for perl

#!/usr/bin/perl

use strict;
use warnings;
use Net::SMTP::TLS;

my $mailer = new Net::SMTP::TLS(
    'prwebmail',
    Hello => 'localhost',
    Port => 25,
    User => 'YOUR_PROJECT_NAME',
    Password => 'PASSWORD', # As set on your project's config page
);

my $subject = 'Testing email from project web';
my $body = "This was sent via perl from project web!\n";

$mailer->mail('somebody@example.com'); # From
$mailer->to('Somebody <somebody@example.com');
$mailer->data;
$mailer->datasend("Subject: $subject\n\n$body");
$mailer->dataend;
$mailer->quit;