Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/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)

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

Owner

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.

I see. Thanks a bunch!

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