Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uzulla/pseudo_sendmail.php
pseudo sendmail command
https://github.com/uzulla/pseudo_sendmail.php
Last synced: about 1 month ago
JSON representation
pseudo sendmail command
- Host: GitHub
- URL: https://github.com/uzulla/pseudo_sendmail.php
- Owner: uzulla
- Created: 2015-12-12T08:43:09.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2021-06-04T10:22:51.000Z (over 3 years ago)
- Last Synced: 2024-11-18T10:53:26.572Z (about 2 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pseudo sendmail
This is pseudo `sendmail` command for developer.
Write raw mail(eml) to file.
## setup
1. `composer require --dev uzulla/pseudo_sendmail`. or git clone and composer install.
2. set/change your sendmail path configuration.
3. send mail.### php.ini sample
```
sendmail_path = "/{this dir}/bin/sendmail"
# If you installed composer, also can be use following path.
sendmail_path = "/{project path}/vendor/bin/sendmail"
```FYI: `sendmail_path` is `PHP_INI_SYSTEM`. so, You can't set by `ini_set()`.
### SwiftMailer sample
```
// ...
$transport = new Swift_SendmailTransport("/{this dir}/bin/sendmail -ti");
$mailer = new Swift_Mailer($transport);
// ...
```> `-ti` is important. If use SwiftMailer default option `-bs`, the script will be hangup.
## option / settings
- `-o/path/to/output` specify output file path
- `-na` not append eml. output file clear when every send reset.```
sendmail -it [email protected] -o/tmp/test.eml
sendmail -it [email protected] -na -o/tmp
```> `-i -t -f` or other options will be ignored.
> don't `-o /file`, must `-o/file`.
## require
- PHP>=7.4
## do you need mail sending sample?
see `tests/*`.
## LICENSE
MIT