Mudanças entre as edições de "MailCatcher"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
 
(2 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
 +
Instalando
 
<source lang="bash">
 
<source lang="bash">
 
apt-get update
 
apt-get update
 
apt install build-essential libsqlite3-dev ruby-dev
 
apt install build-essential libsqlite3-dev ruby-dev
gem install mailcatcher --no-ri --no-rdoc
+
gem install mailcatcher --no-document
echo "@reboot root $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
 
update-rc.d cron defaults
 
echo "sendmail_path = /usr/bin/env $(which catchmail) -f 'www-data@localhost'" >> /etc/php/7.2/mods-available/mailcatcher.ini
 
phpenmod mailcatcher
 
/usr/bin/env $(which mailcatcher) --ip=0.0.0.0
 
 
</source>
 
</source>
  
 +
Integrando com o Apache2
 +
<source lang="bash">
 +
CATCHMAIL=$(find /var/lib/gems -type f -name catchmail)
 +
sed -i "s|;sendmail_path =|sendmail_path = \"/usr/bin/env $CATCHMAIL\"|g" /etc/php/7.0/apache2/php.ini
 +
sed -i "s|;sendmail_path =|sendmail_path = \"/usr/bin/env $CATCHMAIL\"|g" /etc/php/7.0/cli/php.ini
 +
service apache2 restart
 +
</source>
  
 +
Iniciando o MailCatcher
 
<source lang="bash">
 
<source lang="bash">
 
mailcatcher --foreground --http-ip=0.0.0.0
 
mailcatcher --foreground --http-ip=0.0.0.0
Linha 21: Linha 25:
 
* https://serversforhackers.com/c/setting-up-mailcatcher
 
* https://serversforhackers.com/c/setting-up-mailcatcher
 
* https://stackoverflow.com/questions/43525560/how-to-configure-laravel-mail-php-to-use-built-in-mail-function
 
* https://stackoverflow.com/questions/43525560/how-to-configure-laravel-mail-php-to-use-built-in-mail-function
 +
* https://github.com/puphpet/puphpet/issues/506

Edição atual tal como às 02h07min de 21 de outubro de 2020

Instalando

apt-get update
apt install build-essential libsqlite3-dev ruby-dev
gem install mailcatcher --no-document

Integrando com o Apache2

CATCHMAIL=$(find /var/lib/gems -type f -name catchmail)
sed -i "s|;sendmail_path =|sendmail_path = \"/usr/bin/env $CATCHMAIL\"|g" /etc/php/7.0/apache2/php.ini
sed -i "s|;sendmail_path =|sendmail_path = \"/usr/bin/env $CATCHMAIL\"|g" /etc/php/7.0/cli/php.ini
service apache2 restart

Iniciando o MailCatcher

mailcatcher --foreground --http-ip=0.0.0.0

Referências