<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>27 Nov 2016 09:13:06 Z</lastBuildDate><pubDate>27 Nov 2016 09:13:06 Z</pubDate><description>Hi &#13;
&#13;
I import Pop3 email into a table and once imported delete the email from pop server works fantastic.&#13;
&#13;
Only bit I fail to get to work is deal with the array for cc, bcc email addresses and multiple attachments as again its an array.&#13;
&#13;
How do I loop cc, bcc and attachment array.&#13;
&#13;
Any chance of 1 example snippet for cc array.&#13;
&#13;
Thanks&#13;
&#13;
Tony&#13;
&#13;
[code:wl]&#13;
// Start a POP3 session&#13;
	MySession is EmailPOP3Session&#13;
	&#13;
	MySession..ServerAddress = ""&#13;
	MySession..Port = ""&#13;
	MySession..Name = ""&#13;
	MySession..Password =  ""&#13;
	&#13;
	EmailStartSession(MySession)&#13;
	&#13;
	// Retrieve all the messages&#13;
	arrMessage is array of Emails &#13;
	arrMessage = EmailGetAll(MySession)&#13;
	&#13;
	// Browse the array of messages by subscript&#13;
	FOR i = 1 _TO_ MySession..EmailBySubscript..Occurrence&#13;
		&#13;
		&#13;
		salestndwcouk.emaildate = MySession..EmailBySubscript[i]..ReceiveDate&#13;
		salestndwcouk.emailfrom = MySession..EmailBySubscript[i]..SenderAddress&#13;
		salestndwcouk.toemail = MySession..EmailBySubscript[i]..Recipient[1]&#13;
		salestndwcouk.subject = MySession..EmailBySubscript[i]..Subject&#13;
		salestndwcouk.body = MySession..EmailBySubscript[i]..PlainText&#13;
		salestndwcouk.htmlbody = MySession..EmailBySubscript[i]..HTML&#13;
&#13;
&#13;
		// how do i deal with cc, bcc array&#13;
                // need to loop array Email.Cc&#13;
		 &#13;
		// struggle with attachments as an array&#13;
&#13;
		//if MySession..EmailBySubscript[i]..Attach[1].Content &lt;&gt; "" then&#13;
		//salestndwcouk.attachment = MySession..EmailBySubscript[i]..Attach[1]&#13;
		//end&#13;
		&#13;
                HAdd(salestndwcouk,hWriteDefault)&#13;
		EmailDeleteMessage(MySession,i)	&#13;
	END&#13;
[/code]</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/60510-v21-loop-through-email-array-email-fields/read.awp</link><title>v21 Loop through Email.Cc array email fields</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
