<div dir="ltr">Hi, <div><br></div><div>I sent my task two over two days ago and didn&#39;t receive the task 03.</div><div>I already sent 6 times the task 02 answer, but I got nothing instead. </div><div>I used mutt, and a python script.</div>

<div>The first time that I sent was two days ago. </div><div><br></div><div>Has Eudyptula Challenge died ? </div><div>Is down for a few days ?</div><div><br></div><div><br></div><div>Thanks a Lot. </div><div><div><br class="">

--</div>Lucas Tanure <br></div><div><br></div><div><br></div><div>The Python script</div><div><br></div><div><div>tanure@archNote  email $ cat sender.py </div><div>#!/usr/bin/python3</div><div>from smtplib import SMTP</div>

<div>from itertools import chain</div><div>from errno import ECONNREFUSED</div><div>from mimetypes import guess_type</div><div>from subprocess import Popen, PIPE</div><div>from email.mime.base import MIMEBase</div><div>from email.mime.text import MIMEText</div>

<div>from socket import error as SocketError</div><div>from email.mime.multipart import MIMEMultipart</div><div>from os.path import abspath, basename, expanduser</div><div>import getpass</div><div><br></div><div># Define ID</div>

<div>id_eudyptula = &#39;[404ba4c8fd16]&#39;</div><div><br></div><div># Define email addresses to use</div><div>addr_to   = &#39;<a href="mailto:little@eudyptula-challenge.org">little@eudyptula-challenge.org</a>&#39;</div>

<div>addr_from = &#39;<a href="mailto:tanure@linux.com">tanure@linux.com</a>&#39;</div><div><br></div><div># Define SMTP email server details</div><div>smtp_server = SMTP(&quot;<a href="http://smtp.gmail.com">smtp.gmail.com</a>&quot;,587)</div>

<div>smtp_user   = &#39;<a href="mailto:ltanure@gmail.com">ltanure@gmail.com</a>&#39;</div><div>smtp_pass   = getpass.getpass()</div><div><br></div><div><br></div><div>def get_mimetype(filename):</div><div>    content_type, encoding = guess_type(filename)</div>

<div>    if content_type is None or encoding is not None:</div><div>        content_type = &quot;application/octet-stream&quot;</div><div>    return content_type.split(&quot;/&quot;, 1)</div><div><br></div><div><br></div>

<div>def mimify_file(filename):</div><div>    filename = abspath(expanduser(filename))</div><div>    basefilename = basename(filename)</div><div><br></div><div>    msg = MIMEBase(*get_mimetype(filename))</div><div>    msg.set_payload(open(filename, &quot;r&quot;).read())</div>

<div>    msg.add_header(&quot;Content-Disposition&quot;, &quot;attachment&quot;, filename=basefilename)</div><div>    #encode_base64(msg)</div><div>    return msg</div><div><br></div><div><br></div><div>def send_email(subject, text, files):</div>

<div>    # Prepare Message</div><div>    msg = MIMEMultipart()</div><div>    msg.preamble = subject</div><div>    msg.add_header(&quot;From&quot;, addr_from)</div><div>    msg.add_header(&quot;Subject&quot;, id_eudyptula + &#39; &#39; + subject)</div>

<div>    msg.add_header(&quot;To&quot;,addr_to)</div><div><br></div><div>    # Attach the main text</div><div>    msg.attach(MIMEText(text))</div><div><br></div><div>    # Attach any files</div><div>    [msg.attach(mimify_file(filename)) for filename in files]</div>

<div><br></div><div>    # Contact local SMTP server and send Message</div><div>    try:</div><div>        smtp_server.ehlo()</div><div>        smtp_server.starttls()</div><div>        smtp_server.ehlo()</div><div>        smtp_server.login(smtp_user, smtp_pass)</div>

<div>        smtp_server.sendmail(addr_from, addr_to, msg.as_string())</div><div>        smtp_server.quit()</div><div>    except SocketError as e:</div><div>        print(e)</div><div><br></div><div><br></div><div>if __name__ == &quot;__main__&quot;:</div>

<div>    text = open(&#39;text&#39;,&#39;r&#39;).read()</div><div>    send_email(&quot;Task 02 of the Eudyptula Challenge&quot;,text,[&#39;.config&#39;,&#39;dmesg&#39;])</div></div><div><br></div><div><div><div dir="ltr">

<br><br></div></div>
</div></div>