web blazonry web development scripts and tutorials Get best price on LG G3, Metallic Black 32GB (Sprint)
   PHP       Name Generators       Perl       CSS       Javascript       Java       MySql       How Tos       Resources   

Perl Home

Perl Scripts
  Count Links
  Mail to MySQL
  ProcLog Files
  Search and Replace
  Site Monitor
  UnTabify

Perl Articles
  csv2htm Converter
  OLE Automation
  Regular Expressions
  SubDir Recursion

Perl Resources
  Regular Expressions Quick Reference
  Regular Expressions Examples
  Recommended Sites
  Bestselling Perl Books
  Free Perl Books (new)
  Free Python Books(new)

Bookmark and Share




Perl : mail2mysql

December 2000

mail2mysql.pl is a script which reads a mailbox file, parses the messages and inserts them into a MySQL database.

Background
This script was written to send notices via email and have them displayed on the web. The script monitors an email box for messages, when a message arrives it gets put into a database. The database entries are displayed on a webpage using PHP. Because the final destination was the web, I wanted the email messages to be displayed as HTML.

Requirements

  • mhonarc email to HTML converter.
    mhonarc is used to parse multipart messages and to convert the plain text email to HTML messages.

  • MailTools module
    This module is used to parses the mailbox into individual messages. It needs to be downloaded from CPAN.

  • DBI - MySQL
    Appropiate DBI and MySQL drivers should be installed to insert the messages into the database.

See script comments for more customization and configuration.

Download Script: mail2mysql_pl.txt


Related Links:

mhonarc.org - An e-mail to HTML converter

CPAN Mail Category

 

Newest Pages
Test Google Ads Ver. 2
Free Linux Admin Books
Free Linux Books for Programmers
Free Books for Linux on the Desktop
Free PHP Books
Free JavaScript Books
Free Java Books - Advanced
Free Java Books - Basic
Free Perl Books
Free Python Books
Quote of the Day (PHP)
Debugging Part 2
How to Test Google Ads
Most Popular Pages
Baby Name Generator
U.S. Name Generator
Wu Name Generator
Popup Windows (JavaScript)
Upload and Resize an Image (PHP)
How To Install Apache + PHP + MySQL
Intro to Web Databases (PHP, MySQL)

Least Popular Pages
iNews Applet (Java)
Java Resources
Site Monitor (Perl)
PHP Resources
 
 

  privacy policy     ||     © 1997-2016. astonishinc.com   All Rights Reserved.