Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: MailMessage.To.Count=0 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
starlisa
Newbie
Newbie


Joined: 30 July 2014
Location: United States
Online Status: Offline
Posts: 1
Posted: 05 January 2021 at 2:26am | IP Logged Quote starlisa

I have an incoming mail where MailBee sees the number of To addresses as 0. So when I try and grab the first To address, it gives me an "Index was out of range" error. But I'm looking at the email on the server, and there's definitely a To address.

Code:

client.InboxPreloadOptions = MailBee.Pop3Mail.Pop3InboxPreloadOptions.List
Dim list As MailBee.Mime.MailMessageCollection = client.DownloadEntireMessages()
Dim msg As MailBee.Mime.MailMessage
Response.Write("list.Count:" + list.Count.ToString + "<br>")
For Each msg In list
     response.write("-msg.To.Count.ToString:" + msg.To.Count.ToString + "<br>")
     response.flush
     response.write("-msg.Cc.Count.ToString:" + msg.Cc.Count.ToString + "<br>")
     response.flush
     response.write("-msg.Bcc.Count.ToString:" + msg.Bcc.Count.ToString + "<br>")
     response.flush
Next


This is returning:

-msg.To.Count.ToString:0
-msg.Cc.Count.ToString:2
-msg.Bcc.Count.ToString:0

You can't send an email with only CC addresses. You can send with only To addresses and you can send with only BCC addresses. So why is MailBee reporting this incorrectly?

Thanks,
Lisa
Back to Top View starlisa's Profile Search for other posts by starlisa
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2153
Posted: 05 January 2021 at 11:08am | IP Logged Quote Alex

It's perfectly OK for an email to have just CC addresses.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide