Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
system:scripts:sendmail [2016/04/22 14:36] – [Установка] mirocowsystem:scripts:sendmail [2024/05/01 11:34] (текущий) mirocow
Строка 1: Строка 1:
-{{tag>email sendmail send client smtp}}+{{tag>email console sendmail send client smtp}}
  
 ====== smtp-client.pl - Консольный клиент для отправки почты ====== ====== smtp-client.pl - Консольный клиент для отправки почты ======
Строка 7: Строка 7:
 smtp-cli is a powerful SMTP command line client with a support for advanced features, such as STARTTLS, SMTP-AUTH, or IPv6 and with a scriptable message composition capabilities supporting anything from simple plain-text messages right up to building complex HTML emails with alternative plain-text part, attachments and inline images. The MIME-Type of the attachments can either be guessed automatically or alternatively set on the command line, separately for each attachment if required. smtp-cli is a powerful SMTP command line client with a support for advanced features, such as STARTTLS, SMTP-AUTH, or IPv6 and with a scriptable message composition capabilities supporting anything from simple plain-text messages right up to building complex HTML emails with alternative plain-text part, attachments and inline images. The MIME-Type of the attachments can either be guessed automatically or alternatively set on the command line, separately for each attachment if required.
  
-http://www.logix.cz/michal/devel/smtp-cli/+  * http://smtp-cli.logix.cz 
 +  * https://github.com/mludvig/smtp-cli 
 +  * http://192.168.1.2/tools/email/smtp-client
  
 ==== Установка ==== ==== Установка ====
Строка 14: Строка 16:
  
   $ cd ~   $ cd ~
-  $ wget http://www.logix.cz/michal/devel/smtp-cli/smtp-cli-3.6 +  $ wget https://raw.githubusercontent.com/mludvig/smtp-cli/master/smtp-cli 
-  $ mv smtp-cli-3.6 smtp-client.pl+  $ mv smtp-cli smtp-client.pl
  
-  $ cpan install YAML File::Type File::LibMagic IO::Socket::INET6 MIME::Lite Digest::HMAC_MD5 File::Type Term::ReadKey IO::Socket::SSL+  $ cpan install YAML File::Type File::LibMagic IO::Socket::INET6 MIME::Lite Digest::HMAC_MD5 File::Type Term::ReadKey IO::Socket::SSL Net::DNS
 ==== Проверка ==== ==== Проверка ====
  
Строка 24: Строка 26:
 ==== Отправка письма ==== ==== Отправка письма ====
  
- +<code bash> 
-  perl smtp-client.pl --server=smtp.host.ru --from noreplay@myhost.ru --to=test@yandex.ru --subject='Blah blah' +$ perl smtp-client.pl --server=localhost --from noreplay@myhost.ru --to=test@yandex.ru --subject='Blah blah' --ipv4 
-  perl smtp-client.pl --server=smtp.gmail.com --port=465 --user=login --pass=888888 +perl smtp-client.pl --server=smtp.host.ru --from noreplay@myhost.ru --to=test@yandex.ru --subject='Blah blah' 
-  perl smtp-client.pl --subject='Blah' --body-plain='Message txt' +perl smtp-client.pl --server=smtp.gmail.com --port=465 --user=login --pass=888888 
-  perl smtp-client.pl --subject='Blah' --body-html='Message txt'+perl smtp-client.pl --subject='Blah' --body-plain='Message txt' 
 +perl smtp-client.pl --subject='Blah' --body-html='Message txt' 
 +$ perl smtp-client.pl --verbose --server='localhost' --from='noreply@my-server.ru' --to='my-email@yandex.ru' --subject='From SMTP' --body-plain='From SMTP' --ipv4 
 +</code>
      
      
Строка 149: Строка 154:
  
         Other options         Other options
-        --verbose[=<number>   Be more verbose, print the SMTP session.+        --verbose[=<number>| -v    Be more verbose, print the SMTP session.
         --missing-modules-ok    Don't complain about missing optional modules.         --missing-modules-ok    Don't complain about missing optional modules.
         --version               Print: smtp-cli version $version         --version               Print: smtp-cli version $version
Строка 159: Строка 164:
 === Connect failed: IO::Socket::INET6: connect: timeout === === Connect failed: IO::Socket::INET6: connect: timeout ===
  
-Даж при наличии явного флага -4 или --ipv4 при отсутствии соеденения будет выдаваться эта ошибка+Даже при наличии явного флага -4 или --ipv4 при отсутствии соеденения будет выдаваться эта ошибка 
 + 
 +=== Connect failed: IO::Socket::INET6: connect: Connection refused === 
 + 
 +Данное сообщение выводится при невозможности установить соеденение с указанным IP в --server 
 + 
 +==== Ссылки ==== 
 + 
 +{{topic>[mail]}}