imap

How to use Powershell to Monitor a specific inbox for Commands?

拜拜、爱过 提交于 2019-12-24 08:15:21
问题 I would like to set up functionality where a powershell script would access the email in a specific mailbox. It would then parse each email to engage in dialog with a specific set of users. To serve as a system that could be interacted with through email. How could this be pulled off? 回答1: If you want to run this from a client with Outlook installed then the following is a good starting point (EWS is not required). $olFolderInbox = 6 $outlook = new-object -com outlook.application; $mapi =

Why does JavaMail BodyPart.getInputStream() return an empty stream when using IMAP, but not when using POP3?

匆匆过客 提交于 2019-12-24 07:06:42
问题 I have a javax.mail application that parses through emails and gets the InputStream for all application/* attachments: private DataInputStream getAttachmentStream(Message message) throws MessagingException, IOException { if (message.isMimeType("multipart/*")) { Multipart mp = (Multipart) message.getContent(); for (int p = 0; p < mp.getCount(); p++) { BodyPart part = mp.getBodyPart(p); if (part.getContentType().toLowerCase().startsWith("application")) { InputStream is = part.getInputStream();

Connecting to yahoo email with IMAP4 MailSystem.NET

自古美人都是妖i 提交于 2019-12-24 06:41:09
问题 I try to connect to mail yahoo account from C# using net/imap MailSystem.NET. But I get error Stack OverFlow on imap.Login command Anybody tries to connect to Yahoo! Mail and had some experiences about it with MailSystem.NET ? Here's my working code. Imap4Client imap = new Imap4Client(); imap.ConnectSsl("imap.mail.yahoo.com", 993); imap.Login("login@yahoo.com", "PWD"); imap.Command("capability"); 回答1: I would like to suggest you to use ImapX I used it an manage to access Gmail yahoo etc. BTW-

duplicate imap uid validities with mbsync

大兔子大兔子 提交于 2019-12-24 03:24:29
问题 I am using mbsync to get imap mail from my university server and then dovecot locally to serve it to gnus/emacs. This works fine on one desktop machine, and one laptop, but a second laptop creates duplicate UIDs everytime I use it to access my mail. As I have the exact same set-up (to the best of my knowledge) on all three machines I am a bit baffled as to the source of this error. Does this ring any bells for anyone? Is there some sort of hidden or temp file that might be the source of such

Error using IMAP in PHP?

断了今生、忘了曾经 提交于 2019-12-24 02:19:06
问题 I was using the code, <?php $mbox = imap_open("https://myserver.in", "developer@myserver.in", "123456", OP_HALFOPEN) or die("can't connect: " . imap_last_error()); $list = imap_getmailboxes($mbox, "https://myserver.in", "*"); if (is_array($list)) { foreach ($list as $key => $val) { echo "($key) "; echo imap_utf7_decode($val->name) . ","; echo "'" . $val->delimiter . "',"; echo $val->attributes . "<br />\n"; } } else { echo "imap_getmailboxes failed: " . imap_last_error() . "\n"; } imap_close(

Gmail IMAP with PHP?

北战南征 提交于 2019-12-23 19:27:50
问题 I'm trying to connect to my Gmail account in PHP via IMAP but I always get an error that says it can't open stream. I've tried lots of different things to fix this but I've had no luck. By the way, I'm using 000webhost.com to host my website and they say that they support IMAP. Here's my code: $server="{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX"; $inbox = imap_open($server,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error()); For the $username and $password, I

Searching IMAP inbox for messages from a specefic sender and use of wild cards?

主宰稳场 提交于 2019-12-23 18:58:08
问题 Is it possible to use wildcards in searching for a specific sender on IMAP folder? typ, data = M.SEARCH(None, 'from','"security@website*"') 回答1: IMAP RFC 3501 6.4.4: In all search keys that use strings, a message matches the key if the string is a substring of the field. The matching is case-insensitive. So you need to search without * and you should almost similar result. (you get security@website ...) 来源: https://stackoverflow.com/questions/7719664/searching-imap-inbox-for-messages-from-a

Pass hashed password to Java Mail API

送分小仙女□ 提交于 2019-12-23 17:23:28
问题 Good morning everybody, I'm developping an ERP for my company with the GWT Framework and I would get the number of unread emails using the Java Mail API. I can do this but, the problem is I stores the SHA-512 hashed password on the database and I would not pass the clear password to the Java Mail API, but just the hashed password to avoiding to transmit the clear password on the network. I use this code to get the number of unread mail: private static int getNumberOfUnreadMails() { int

IMAP - editing a draft or existing message?

拜拜、爱过 提交于 2019-12-23 12:32:51
问题 For those of you familiar with IMAP - If I retrieve a draft message (or any message for that matter), and I wish to update it / edit it, what commands should I use? The only command i've come across is Append , which appears to only insert, meaning I would have to delete the previous draft from the mailbox? 回答1: IMAP is designed for server-side management of mailboxes, not for editing messages. So yes, you would have to retrieve the contents of the desired message ( FETCH ), then delete that

PHP imap_open(): invalid remote specification when trying connect to GMAIL

China☆狼群 提交于 2019-12-23 09:49:41
问题 I'm trying to retrive mails from Gmail and got following error: Can't open mailbox {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX: invalid remote specification OpenSSL and IMAP are installed in my server, following are openssl & imap info from phpinfo(); openssl OpenSSL support enabled OpenSSL Library Version OpenSSL 0.9.7l 28 Sep 2006 OpenSSL Header Version imap IMAP c-Client Version 2007e Kerberos Support enabled I'm really confused now, please help! 回答1: I have been having a similar