Sending Mail Problem with NTLM

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

  1. Tommylicious


    Oct 17, 2017
    Likes Received:
    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 = ''
    c.Fields.Item('cdoSMTPConnectionTimeout').Value = 10
    c.Fields('cdoSMTPServerPort').Value = 25
    c.Fields('cdoSMTPAuthenticate').Value = 2
    m = win32com.client.Dispatch('CDO.Message')
    m.Configuration = c
    m.To = ''
    m.From = 'Test'
    m.Htmlbody = '<H3><B>this is a test</B></H3>'
    m.Subject = 'Testigertest'
    The problem is here:
    c.Fields('cdoSMTPAuthenticate').Value = 2

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