Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new file: backend/examples/crabfeeder.rs #82

Closed
wants to merge 4 commits into from
Closed

new file: backend/examples/crabfeeder.rs #82

wants to merge 4 commits into from

Conversation

stappersg
Copy link
Contributor

a SMTP client for injecting emails into mailcrab

a SMTP client for injecting emails into mailcrab
@stappersg stappersg changed the title new file: backend/examples/crabfeeder.rs WIP new file: backend/examples/crabfeeder.rs Jun 12, 2023
@stappersg
Copy link
Contributor Author

Marked as Work In Progress because the actual sending has still to be implemented.
Reason for the early release is preventing code duplication.

Heavely based upon what was found in the mailcrab git repository.
The address of mailcrabs SMTP server can be configured
by setting the environment variable SMTP_SERVER. Value must
be an valid IP address.

The usage message has it documented, also SMTP_PORT.

Their values are printed before a connect is attempted.

Printing which file has been send.
Difference against examples/crabfeeder.rs,
the source file on which it is based:

* No usage message, because no parameters are required
* All happens in main()
* Other envelope addresses
* Embedded message (no reading from file at runtime)

Use `diff -wu examples/crabfeeder.rs examples/multiple_rcpt_to.rs`
for all the non-white space changes. Leave out the 'w'
in `diff -wu crabfeeder.rs multiple_rcpt_to.rs` to see all changes.
@stappersg stappersg changed the title WIP new file: backend/examples/crabfeeder.rs new file: backend/examples/crabfeeder.rs Jun 14, 2023
@stappersg
Copy link
Contributor Author

The examples/crabfeeder.rs considered complete. ( Label WIP removed. )

This merge request also brings in examples/multiple_rcpt_to.rs (c342fc9).

@stappersg
Copy link
Contributor Author

cross reference to #69

@stappersg stappersg mentioned this pull request Jun 14, 2023
@marlonbaeten
Copy link
Member

We already have e mechanism for sending test messages, as a Rust test case - see https://github.com/tweedegolf/mailcrab/blob/main/backend/src/main.rs#L303
This will send all files in the samples/ directory as an email, interpreting the first two lines as sender en recipient addresses respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants