mirror of
https://github.com/moparisthebest/mailcatcher
synced 2024-12-22 07:18:53 -05:00
notes for PHP
- "dont forget FROM" otherwise mail() will just fail - added php code example
This commit is contained in:
parent
a06f51d4bb
commit
9d71c72c42
12
README.md
12
README.md
@ -63,6 +63,18 @@ You can do this in an [Apache htaccess file](http://php.net/manual/en/configurat
|
||||
|
||||
If you've installed via RVM this probably won't work unless you've manually added your RVM bin paths to your system environment's PATH. In that case, run `which catchmail` and put that path into the `sendmail_path` directive above instead of `/usr/bin/env catchmail`.
|
||||
|
||||
Don't forget to set 'From' header.
|
||||
|
||||
Code example:
|
||||
~~~
|
||||
<?php
|
||||
$to = 'to@domain.tld';
|
||||
$subject = 'Subject';
|
||||
$message = 'Message';
|
||||
$headers = 'From: from@domain.tld';
|
||||
mail($to, $subject, $message, $headers);
|
||||
~~~
|
||||
|
||||
### Django
|
||||
|
||||
For use in Django, simply add the following configuration to your projects' settings.py
|
||||
|
Loading…
Reference in New Issue
Block a user