Skip to content

Instantly share code, notes, and snippets.

@etobi
Created January 5, 2015 11:52
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etobi/2ed4633525cf77696b80 to your computer and use it in GitHub Desktop.
Save etobi/2ed4633525cf77696b80 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
path = "/Users/tobias/fake-mailer"
Dir.mkdir(path) if !File.exists?(path)
File.open("#{path}/#{Time.now.to_i}.eml", "w") do |f|
f.puts ARGV.inspect
$stdin.each_line { |line| f.puts line }
end
sleep(1)
@smichaelsen
Copy link

How do you use this, e.g. configure TYPO3 to use it?

@etobi
Copy link
Author

etobi commented Jan 7, 2015

Just add this in your AdditionalConfiguration:

$GLOBALS['TYPO3_CONF_VARS']['MAIL'] = array(
    'transport' => 'sendmail',
    'transport_sendmail_command' => '/Users/tobias/bin/fake-sendmail.sh -t',
);

Alternatively you can configure the script for "sendmail_path" in your php.ini.

@smichaelsen
Copy link

I see. Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment