title: Sending e-mail after scrape in scrapy
body: <p><strong>pipeline.py code</strong></p>
  
  <pre><code>class Examplepipeline(object):
  
      def __init__(self):
          dispatcher.connect(self.spider_opened, signal=signals.spider_opened)
          dispatcher.connect(self.spider_closed, signal=signals.spider_closed)
  
      def spider_opened(self, spider):
          log.msg("opened spider  %s at time %s" % (spider.name,datetime.now().strftime('%H-%M-%S')))
  
      def process_item(self, item, spider):
              log.msg("Processsing item " + item['title'], level=log.DEBUG)
  
  
      def spider_closed(self, spider):
          log.msg("closed spider %s at %s" % (spider.name,datetime.now().strftime('%H-%M-%S')))
  </code></pre>
  
  <p>In the above spider code , it will display the starting time and ending time of the spider, but now after the completion of the spider, i want to receive  a mail that "Scraping has been completed" from scrapy. Is it possible to do this. If possible can we write that code in spider_closed method, can anyone please share some example code on how to do this.  </p>