Rake task for configuring SMTP server on Shares

Rake tasks are scripts that allow you to retrieve, delete or update information on your Shares server using the command line. Rake tasks can perform actions on user accounts, shares and nodes. This article describes the rake task available for configuring SMTP email settings. For more general information on Shares rake tasks see this article (Shares rake tasks).

Usage

You can set up the SMTP server used for sending email notifications with a rake task. The syntax is the following:

Rake tasks must be run from within the appropriate location in the shares folder:
  • Linux Shares 1.8 and later: /opt/aspera/shares/u/shares/bin
  • Linux Shares earlier than 1.8: /opt/aspera/shares/u/shares
  • Windows: C:\Shares\www
rake data:smtp_server -- [options]

 

The available options are the following:

option description                                                                                      
--server server
The SMTP server address.
--port port
The SMTP port.
--domain domain The email domain name.
--tls true|false Whether to use TLS if available.
--username username The email username.
--password password The email password.
--from email The email sender’s address that will appear in the ‘from’ field.



All options are required when you run the rake task for the first time. Any subsequent runs of the rake task will modify the specified fields and leave everything else the same.

 

Example

To configure SMTP for the server smtp.example.com and the email rhagrid@example.com, the rake task might look like the following:

rake data:smtp_server -- --server smtp.example.com --port 1234 --domain example.com --tls true 
--username rhagrid --password 3x@mp13_p@zzw0rd --from rhagrid@example.com
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk