Hi, I wrote this simple code that works fine:
import win32com.client as W olook = W.gencache.EnsureDispatch("%s.Application" %profilename) mail = olook.CreateItem(W.constants.olMailItem) mail.Recipients.Add('x...@yahoo.com) mail.Subject = 'Hello' mail.Body = 'Hello' mail.Send() When I have Outlook open it sends the email from my Outlook account. How can I change the "From" field in the code so that I can specify a different sender? Also how can I add attachment from this python code? Thanks, Sinha.
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32