Skip to content

Instantly share code, notes, and snippets.

View ogidaniel's full-sized avatar
🎯
Focusing

Daniel OGIDAN ogidaniel

🎯
Focusing
View GitHub Profile
@ogidaniel
ogidaniel / PHPMailYandex.php
Created February 26, 2021 14:25 — forked from nagiyevelchin/PHPMailYandex.php
PHPMail Yandex send through smtp and save sent mail in imap folder
<?php
print "<pre>";
$mbox = imap_open("{imap.yandex.ru}/ONE", "***@yandex.ru", "****", OP_HALFOPEN)
or die("can't connect: " . imap_last_error());
$list = imap_getmailboxes($mbox, "{imap.yandex.ru}", "*");
if (is_array($list)) {
print_r($list);
} else {
echo "imap_getmailboxes failed: " . imap_last_error() . "\n";
}