Skip to content

Instantly share code, notes, and snippets.

@aikchun
aikchun / imap-gmail
Last active June 12, 2024 11:41
IMAP PHP gmail attachment extractor
<?php
/**
*
* Gmail attachment extractor.
*
* Downloads attachments from Gmail and saves it to a file.
* Uses PHP IMAP extension, so make sure it is enabled in your php.ini,
* extension=php_imap.dll