There are ways to send email from python, not sure if is a complete
solution for you but maybe it willl help if its like something of
personal use:

#!/usr/bin/python

import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email import Encoders
import os
import sys
import urllib

gmail_user = "y...@gmail.com"
gmail_pwd = "******"

def mail(to, subject, text):
        msg = MIMEMultipart()

        msg['From'] = "ottoc...@openoffice.org"
        msg['To'] = to
        msg['Subject'] = subject

        mailServer = smtplib.SMTP("smtp.gmail.com", 587)
        mailServer.ehlo()
        mailServer.starttls()
        mailServer.ehlo()
        mailServer.login(gmail_user, gmail_pwd)
        mailServer.sendmail("y...@email.com", to, msg.as_string())
# Should be mailServer.quit(), but that crashes...
        mailServer.close()

if len(sys.argv) == 3:
        url = 'http://tinyurl.com/api-create.php?url=' + sys.argv[2]
        abre = urllib.urlopen(url)
        tiny = ". " + abre.read()
        mail("s...@email.com",
        sys.argv[1] + tiny, "<insert message>")
elif len(sys.argv) == 2:
        mail("s...@email.com",
        sys.argv[1], "<insert message>")
else:
        print "Te falto comandos"


This is a modified code to send email to a specific email account and
shorten links through tinyurl. If you dont need this you can ignore
the second part of the script. Also if you want to

On Wed, Apr 21, 2010 at 1:58 AM, Mathias Bauer <nospamfor...@gmx.de> wrote:
> Hi,
>
> Fernand Vanrie wrote:
>
>> Paolo , Andrew, all
>>
>> Can i have  hope to set also the "body" of a email message  ?
>
> This is not possible by intent, as (at least to my knowledge) the
> "mailto:"; protocol we are using for the implementation of this service
> on most platforms (at the end, it's a "simple" mail service) does not
> allow to pass a body text to the mail client.
>
> It could work with the MAPI based implementation on Windows, but if you
> write platform specific code, you don't need a platform independent API
> for that.
>
> Regards,
> Mathias
>
> --
> Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
> OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
> Please don't reply to "nospamfor...@gmx.de".
> I use it for the OOo lists and only rarely read other mails sent to it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
> For additional commands, e-mail: dev-h...@api.openoffice.org
>
>



-- 
Alexandro Colorado
OpenOffice.org Español
http://es.openoffice.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to