Archived Forum Post

Index of archived forum posts

Question:

pop3 recipient

May 14 '13 at 11:33

I am trying to get the email address of the recipient. Is there an easier way than parsing the header?


Answer

A good place to start would be to review the reference documentation for the Email object:

http://www.chilkatsoft.com/refdoc/csEmailRef.html

You'll find the following properties: NumTo, NumCC

You'll also find the following methods: GetTo, GetToName, GetToAddr, GetCC, GetCcName, and GetCcAddr.

You would loop from 0 to NumTo-1 (and/or 0 to NumCC-1) calling the Get method for each loop iteration to get the Nth name or address.


Answer

Thanks! I was looking at the ActiveX documentation (http://www.chilkatsoft.com/refdoc/xChilkatEmailBundle2Ref.html) which is what I am using with Visual Foxpro. It doesn't mention most of the methods and properties the C# page does.


Answer

When I check "getto" values, I get blanks but checking "getheaderfield("TO") returns the to value. Is this related to the format of the email?

Thanks.