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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -