Sending Mail Problem with NTLM

Discussion in 'Python' started by Tommylicious, Oct 17, 2017.

  1. Tommylicious

    Tommylicious

    Joined:
    Oct 17, 2017
    Messages:
    1
    Likes Received:
    0
    I am trying to send an email via python, but it does not work. Can someone give me a hint, what I am doing wrong here?

    Code (Python):

    import win32com.client
    c = win32com.client.Dispatch('CDO.Configuration')
    c.Fields.Item('cdoSendUsingMethod').Value = 2
    c.Fields.Item('cdoSMTPServer').Value = 'smtp.myserver.de'
    c.Fields.Item('cdoSMTPConnectionTimeout').Value = 10
    c.Fields('cdoSMTPServerPort').Value = 25
    c.Fields('cdoSMTPAuthenticate').Value = 2
    c.Fields.Update()
    m = win32com.client.Dispatch('CDO.Message')
    m.Configuration = c
    m.To = 'my-mail@myserver.com'
    m.From = 'Test'
    m.Htmlbody = '<H3><B>this is a test</B></H3>'
    m.Subject = 'Testigertest'
    m.Send()
     
    The problem is here:
    c.Fields('cdoSMTPAuthenticate').Value = 2

    also using "cdontlm" instead of "2" doesn't really help...
     
    Tommylicious, Oct 17, 2017
    #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.