email - PHP mail() in dev environment: open the mail in a browser/editor instead of sending it? -
on machine need test mails sent application. i'd rather avoid sending real mails.
is there way have email content showed screen way or another, maybe opening in gedit or text editor?
maybe replacing commandline used launch "sendmail"?
i asking linux machines (ubuntu more specifically).
include means of determining environment in project, or @ least kind of global variable holds information.
then build abstract mail interface either sends real mails if it's running on production server, logs them local files in case runs on dev machine / environment. logging package, recommend monolog.
this allow design rest of application (or @ least mail sending components) in way doesn't have care environment.
Comments
Post a Comment