Python Outlook How to send reply email with different email account

Discussion in 'Python' started by heycooldude, Mar 26, 2014.

  1. heycooldude

    heycooldude

    Joined:
    Mar 26, 2014
    Messages:
    1
    Likes Received:
    0
    Hi,
    I want to send back reply to the same email but with different email account.
    Here is my script

    mail = outlook.Session.GetItemFromID(ID)
    subject = mail.Subject
    c = mail.Sender.Address
    if mail:
    message_reply = mail.Reply()
    message_reply.From='_from_email' # not working #
    message_reply.Body = "THE FOLLOWING TASK HAS BEEN MARKED AS COMPLETED: \n\n"
    message_reply.CC= '_CC_Email'
    message_reply.Send()

    I tried message_reply.From, message_reply.Sender.Address, mail.From but nothing is working. It is sending from my default email account.
    message_reply.CC, message_reply.Body is working.

    Can anyone help me out?
     
    heycooldude, Mar 26, 2014
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.