email - Configure sendmail to send mail only to local mail address -


i need configure sendmail in order test websites , app mail function locally;

i wish if on production mail() function sends mail user@hisdomain.com, same code tested locally sends mail myfolder@localhost in order check messages details, functionalities , on.

i'm on lamp machine.

is possible?

you may configure sendmail deliver outgoing mail local mailbox/alias.
should catch message non local mailboxes.

sendmail.mc file (used generate sendmail.cf file):

define(`smart_host`,`local:myfolder`)dnl 

restart/reload sendmail daemon after compiling new sendmail.cf file sendmail.mc file.


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -