### RSendMail Docker Usage Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md An example of running rsendmail within a Docker container, mounting local directories for email processing and setting the logging level. ```bash docker run --rm -v $(pwd)/emails:/data rsendmail --smtp-server 192.168.1.100 --port 25 --from sender@example.com --to recipient@example.com --dir /data --processes 10 --batch-size 5 --log-level info ``` -------------------------------- ### Build RSendMail Locally (Bash) Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Builds the RSendMail tool from source using Cargo for release. ```bash cd rsendmail cargo build --release ``` -------------------------------- ### Build RSendMail Docker Image (Bash) Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Builds a Docker image for RSendMail. ```bash docker build -t rsendmail . ``` -------------------------------- ### Run RSendMail on Windows (Bash) Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Executes the RSendMail tool on Windows, specifying various parameters for email sending. Requires downloading the executable from the releases page. ```bash rsendmail-windows-x86_64.exe --smtp-server --port --from --to --dir --processes --batch-size ``` -------------------------------- ### Run RSendMail using Docker (Bash) Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Runs RSendMail as a Docker container, mounting a local directory for emails and specifying sending parameters. ```bash docker run --rm -v /path/to/emails:/data rsendmail --smtp-server --port --from --to --dir /data --processes --batch-size ``` -------------------------------- ### RSendMail Sending Multiple Files as Attachments Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Demonstrates sending all files from a specified directory as individual email attachments, each with a unique subject. The --dir parameter is not required. ```bash rsendmail --smtp-server 192.168.1.100 --port 25 --from sender@example.com --to recipient@example.com --attachment-dir ./documents --subject-template "File: {filename}" ``` -------------------------------- ### Run RSendMail Locally (Bash) Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Executes the RSendMail tool from a local build, specifying parameters for email sending. ```bash rsendmail --smtp-server --port --from --to --dir --processes --batch-size ``` -------------------------------- ### RSendMail Default Logging Usage Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Demonstrates the default usage of rsendmail with the 'info' logging level, sending emails from a specified directory. ```bash rsendmail --smtp-server 192.168.1.100 --port 25 --from sender@example.com --to recipient@example.com --dir ./emails --processes 10 --batch-size 5 ``` -------------------------------- ### RSendMail Custom Templates with Attachment Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Shows how to send a file attachment with a customized email subject and text content using template variables. The --dir parameter is not required. ```bash rsendmail --smtp-server 192.168.1.100 --port 25 --from sender@example.com --to recipient@example.com --attachment ./document.pdf --subject-template "Important file: {filename}" --text-template "Hello,\n\nPlease find the attached file: {filename}.\n\nRegards,\nRSendMail Team" ``` -------------------------------- ### RSendMail Single Attachment Sending Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Demonstrates sending a single file as an email attachment using the --attachment flag. The --dir parameter is not required in this mode. ```bash rsendmail --smtp-server 192.168.1.100 --port 25 --from sender@example.com --to recipient@example.com --attachment ./document.pdf ``` -------------------------------- ### RSendMail Debugging and Error Logging Usage Source: https://github.com/relaxcloud-cn/rsendmail/blob/main/README.md Shows how to configure rsendmail for detailed debugging output or to display only error messages using the --log-level flag. ```bash rsendmail --smtp-server 192.168.1.100 --port 25 --from sender@example.com --to recipient@example.com --dir ./emails --processes 10 --batch-size 5 --log-level debug ``` ```bash rsendmail --smtp-server 192.168.1.100 --port 25 --from sender@example.com --to recipient@example.com --dir ./emails --processes 10 --batch-size 5 --log-level error ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.