Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: Using smtplib module to send email

import smtplib
def send_email(from, to, message):
    serveur=smtplib.SMTP("localhost", 8085)
    serveur.sendmail(from, to, message)
send_email('m

Java-JavaMail: How to send an email message

import javax.mail.Session;
import javax.mail.Message;
import javax.mail.Transport;
import javax.mail.MessagingException;
import javax.mail.internet.M

Python: How to get element by name

from xml.dom import minidom
xmldoc = minidom.parse('c:/test.xml')
email = xmldoc.getElementsByTagName('addr')[0].firstChild.data
print email
[/pyth

Java-JavaMail: How to send an email message

import javax.mail.Session;
import javax.mail.Message;
import javax.mail.Transport;
import javax.mail.MessagingException;
import javax.mail.internet.M

Perl: Using Classes as Structs

#!/usr/local/bin/perl -w
use Class::Struct;          # load struct module
# create a definition for a "Person" class
struct Person => {        
    f