Acme-CPANModulesBundle-Import-PerlDancerAdvent-2018

 view release on metacpan or  search on metacpan

devdata/http_advent.perldancer.org_2018_17  view on Meta::CPAN

    to => 'bar@perl.dance',
    subject => 'Welcome to the dancefloor!',
    body   => $text,
    attach => {
        Data     => $html,
        Type     => "text/html"
    },
    multipart => 'alternative',
};</pre>

<h2><a name="configuration"></a>Configuration</h2>

<h3><a name="transports"></a>Transports</h3>

<p>Under the hood the plugin uses <a href="https://metacpan.org/pod/Email::Sender">Email::Sender</a>, so you can utilize its transports instead of the "sendmail" one (local mail server).</p>
<p>This is just a matter of adjusting your configuration:</p>
<pre class="prettyprint">plugins:
  Email:
    transport:
      SMTP:
        ssl: 1
        host: 'mail.perl.dance'
        port: 465
        sasl_username: 'foo@perl.dance'
        sasl_password: 'nevairbe'</pre>

<p>In development you want to <b>prevent</b> email going out to <b>real users</b>.</p>
<p>This can be done with the <a href="https://metacpan.org/pod/Email::Sender::Transport::Redirect">Redirect</a> transport:</p>
<pre class="prettyprint">plugins:
  Email:
    transport:
      Sendmail:
        redirect_address: racke@perl.dance</pre>

<p>All email will be send to the specificied address, but with extra headers added with the original recipients:</p>
<pre class="prettyprint">X-Intercepted-To: "Bar" &lt;bar@perl.dance&gt;
X-Intercepted-Cc: "Baz" &lt;baz@perl.dance&gt;</pre>

<p>Note: it's the presence of the <code>redirect_address</code> parameter which tells the
plugin you want mails redirected to that address, this will work with whatever
transport you wish to use.</p>
<h3><a name="preseed_headers"></a>Preseed headers</h3>

<p>If you have a standard email address and/or you want to have extra email headers, you can specify these in the
configuration as well:</p>
<pre class="prettyprint">plugins:
  Email:
    sender: "2019@perl.dance"
    from: "Perl Dancer Conference 2019 &lt;2019@perl.dance&gt;"
    X-Mailer: "PerlDance2018 4.0"</pre>

<h2><a name="author"></a>Author</h2>

<p>This article has been written by racke for the Perl Dancer 
Advent Calendar 2018.</p>
</div>

 <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'danceradvent'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>




</div>



<div id="footer">
Powered by the  
<a href="http://perldancer.org/" title="Perl Dancer - Perl web framework">
Dancer Perl web framework</a>
</div>
</div>


<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-25174467-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</body>
</html>



( run in 1.090 second using v1.01-cache-2.11-cpan-39bf76dae61 )