how to Copy image in the body of mail

Asked by muni on 2020-04-30

Hello friends,
I would need your help in copying image in body of the mail,is it possible??
so far i know we can attach mail.Below is the code i have to attach mail.
def outlook():
    click(Pattern("1588262466233.png").targetOffset(0,1))
    wait(1)
    img = capture(Region(1,0,1893,1125), "file1")
    wait(1)
    img2 = capture(Region(1,0,1893,1125), "file2")
    shutil.move(img2, os.path.join(r'C:\Users\ramamun\Downloads\Sikuli', "file2.png"))
    wait(3)

    subprocess.call(["C:\Program Files (x86)\Microsoft Office\Office15\OUTLOOK.EXE", "/c", "ipm.note", "/m", "<email address hidden>&subject=Itrac Dashboard checks%20-SOW&body=Hello Muni%20SOW Checks have been completed%20For Itrac", "/a", img])

    #Screen(1)
    wait(4)
    click(Pattern("1584356722262.png").similar(0.77).targetOffset(-13,0))
    wait(2)
    #type(KeyModifier.ALT+Key.S)

    click(Pattern("1588270342551.png").targetOffset(-37,-18))
    wait(2)

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-04-30
Last reply:
2020-05-06
muni (rajeshmuni) said : #1

hi ANy update for me please

RaiMan (raimund-hocke) said : #2

This is too special.

check the workflow manually and especially the subprocess call, that it does what you want.

You have to do some more checks and debugging.

Can you help with this problem?

Provide an answer of your own, or ask muni for more information if necessary.

To post a message you must log in.