[gull] Envoi de mail depuis Debian
Marcel Ryser
marcel.ryser at gmail.com
Thu Dec 21 11:08:52 CET 2006
> Comment faire pour envoyer un mail depuis une box Debian sans avoir de
> daemon qui tourne?
une solution est d'utiliser un serveur smtp externe:
par ex. avec smtplib de python
def mailit(subject, fro, to, msg):
import smtplib
msg = ("From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n%s" % (fro, to,
subject, msg))
server = smtplib.SMTP('smtp.deckpoint.ch')
server.sendmail(fro, to, msg)
server.quit()
mailit("hello", "truc at machin.net", "marcel at truc.com","corps du mail")
--
Marcel Ryser
More information about the gull
mailing list