• resserone13

    @cvp @ccc. Thanks. I'm able to take a pick and send it via email. I used ...

    #converts image to bytes and create mime image for mime email.
    with io.BytesIO() as buf:
        sent_img = buf.getvalue()
        img_sent = MIMEImage(sent_img)
    # And..

    I was using and I'm wondering if it's better to send pic via email with.

    attachment = open('/var/mobile/Media/DCIM/', 'rb',) as f:
    #attachment = open('/var/mobile/Media/DCIM/', 'rb',)
    #Adds attachment and encoding for attachment.
    #part = MIMEBase(sent_img, 'png')
    #part = MIMEBase('application', 'octet-stream')
    #part.add_header('Content-disposition', 'attachment: file' + sent_img)

    posted in Pythonista read more
  • resserone13

    @cvp @ccc I'm still fitting pieces of the code you suggested into my existing code. Having a bit of trouble but going to try to work on it more.

    I have hear the the with keyword will open and close things. Thanks

    posted in Pythonista read more
  • resserone13

    @cvp thanks I will try this and the other suggestion and let you know. Thanks.

    posted in Pythonista read more
  • resserone13

    @ccc when I take a pic with the capture_image() how do I name it so I can pass it to create_image_asset() then send it via a mime email.

    posted in Pythonista read more
  • resserone13

    Can some demonstrate all the methods and function of the photos module? I'm have trouble using create_image_asset(). I want to take a photo and save it to a perticular album. After that I want the photo sent via email and then deleted for the album.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!