Is it possible to fetch gmail emails using VBA?

2019-04-17 06:57发布

问题:

I'm trying to drop Outlook from my MS Access application. The main problem is to fetch emails from my gmail account and for example delete it or read the body etc. I know I can use CDO to send email from VBA using my gmail account, but is it possible to get my inbox using VBA?

Thanks.

回答1:

I have found the solution. There is a library you can use to fetch emails from using IMAP or POP3 protocol via VBA http://emailarchitect.net/eagetmail/kb/vb.aspx



回答2:

You would need some type of intermediate API call, such as an SMTP service, in order to accomplish this task. You would then be able to setup a CDO object through which to read/write messages.