<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Working with CRM Emails</title>
	<atom:link href="http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/</link>
	<description>Knowledge found and lost while working with Microsoft CRM</description>
	<pubDate>Wed, 19 Nov 2008 12:07:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Ken Bagwell</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1337</link>
		<dc:creator>Ken Bagwell</dc:creator>
		<pubDate>Fri, 14 Nov 2008 22:23:37 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1337</guid>
		<description>Hi Mitch, thx for the nice example. Do you have any idea on how to direct a created email like this to a particular Queue?

Thanks again,

Ken</description>
		<content:encoded><![CDATA[<p>Hi Mitch, thx for the nice example. Do you have any idea on how to direct a created email like this to a particular Queue?</p>
<p>Thanks again,</p>
<p>Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stalin</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1336</link>
		<dc:creator>Stalin</dc:creator>
		<pubDate>Fri, 14 Nov 2008 18:59:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1336</guid>
		<description>email.to is working fine from the following code
currentUserId = new Guid("8F163A26-DC21-DD11-95BD-0013723C6CB7");
activityparty[] toparty1 = new activityparty[1];
toparty1[0] = new activityparty();
toparty1[0].partyid = new Lookup();
toparty1[0].partyid.type = EntityName.systemuser.ToString();
toparty1[0].partyid.Value = currentUserId;
em.to = toparty1;


but for email.torecipients getting following error
"Invalid share id". Any idea how to send mail non CRM users mail id</description>
		<content:encoded><![CDATA[<p>email.to is working fine from the following code<br />
currentUserId = new Guid(&#034;8F163A26-DC21-DD11-95BD-0013723C6CB7&#034;);<br />
activityparty[] toparty1 = new activityparty[1];<br />
toparty1[0] = new activityparty();<br />
toparty1[0].partyid = new Lookup();<br />
toparty1[0].partyid.type = EntityName.systemuser.ToString();<br />
toparty1[0].partyid.Value = currentUserId;<br />
em.to = toparty1;</p>
<p>but for email.torecipients getting following error<br />
&#034;Invalid share id&#034;. Any idea how to send mail non CRM users mail id</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1323</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Wed, 12 Nov 2008 01:14:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1323</guid>
		<description>Here is the code for adding multiple recipients...
            // RSUsers is an array with dynamic GUIDs of users
            List partyList = new List();
            foreach (string RSUsers in systemUsers)
            {
                activityparty party = new activityparty(); 
                party.partyid = new Lookup(); 
                party.partyid.type = EntityName.systemuser.ToString(); 
                party.partyid.Value = new Guid(RSUsers);
                partyList.Add(party); 
            }
            Email.to = partyList.ToArray();</description>
		<content:encoded><![CDATA[<p>Here is the code for adding multiple recipients&#8230;<br />
            // RSUsers is an array with dynamic GUIDs of users<br />
            List partyList = new List();<br />
            foreach (string RSUsers in systemUsers)<br />
            {<br />
                activityparty party = new activityparty();<br />
                party.partyid = new Lookup();<br />
                party.partyid.type = EntityName.systemuser.ToString();<br />
                party.partyid.Value = new Guid(RSUsers);<br />
                partyList.Add(party);<br />
            }<br />
            Email.to = partyList.ToArray();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1321</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Tue, 11 Nov 2008 19:02:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1321</guid>
		<description>Mitch, thanks for the quick response. I am able to send emails to single recipients. But having trouble sending to multiple in the To: field. In the post (12) above, you mentioned "add more people to the activityparty list". 

Can you please give an example to that. I really appreciate your help. Thanks.</description>
		<content:encoded><![CDATA[<p>Mitch, thanks for the quick response. I am able to send emails to single recipients. But having trouble sending to multiple in the To: field. In the post (12) above, you mentioned &#034;add more people to the activityparty list&#034;. </p>
<p>Can you please give an example to that. I really appreciate your help. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mitch</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1320</link>
		<dc:creator>mitch</dc:creator>
		<pubDate>Tue, 11 Nov 2008 18:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1320</guid>
		<description>Raj, please review the SDK for the email.to field for more info.  Here is how it works:

35:  // Specify who the email is TO
36:  activityparty to = new activityparty();
37:  to.partyid = new Lookup();
38:  to.partyid.Value = accountID;
39:  to.partyid.type = EntityName.account.ToString(); 
40:    
41:  // Add the TO and FROM parties to the email  
42:  email.from = new activityparty[] {from};
43:  email.to = new activityparty[] {to};</description>
		<content:encoded><![CDATA[<p>Raj, please review the SDK for the email.to field for more info.  Here is how it works:</p>
<p>35:  // Specify who the email is TO<br />
36:  activityparty to = new activityparty();<br />
37:  to.partyid = new Lookup();<br />
38:  to.partyid.Value = accountID;<br />
39:  to.partyid.type = EntityName.account.ToString();<br />
40:<br />
41:  // Add the TO and FROM parties to the email<br />
42:  email.from = new activityparty[] {from};<br />
43:  email.to = new activityparty[] {to};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1319</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Tue, 11 Nov 2008 17:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1319</guid>
		<description>Any example on how to add multiple recipients to the To: and CC fields? Thanks</description>
		<content:encoded><![CDATA[<p>Any example on how to add multiple recipients to the To: and CC fields? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mitch</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1317</link>
		<dc:creator>mitch</dc:creator>
		<pubDate>Tue, 11 Nov 2008 16:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1317</guid>
		<description>Andrew,

I have not seen that particular problem but for multiple emails, I do know that the to and from recipients works fine.

Look up PartyList in the SDK for more info.

Mitch</description>
		<content:encoded><![CDATA[<p>Andrew,</p>
<p>I have not seen that particular problem but for multiple emails, I do know that the to and from recipients works fine.</p>
<p>Look up PartyList in the SDK for more info.</p>
<p>Mitch</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1313</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 10 Nov 2008 16:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1313</guid>
		<description>Hi Mitch,
I used one of your examples about a year ago in developing a plug in to send email templates.  It was very helpful.  However, I have a situation where we've upgraded to CRM 4.0 and what worked in 3.0 no longer does.  

We have cases where we must use to.addressused and cc.addressused in order to use an email string rather than a Guid.  In the case of cc.addressused I was able to string together multiple email addresses seperated by a semi-colon and plug that in.  However, since our upgrade I can no longer do that.  cc.addressused only allows for a single address. 

I've never used torecipients so am unfamiliar with this.  It doesn't appear based on the posts above that it would solve my issue.  Have you ever seen this before and if so do you have any thoughts?

Thanks, Andrew</description>
		<content:encoded><![CDATA[<p>Hi Mitch,<br />
I used one of your examples about a year ago in developing a plug in to send email templates.  It was very helpful.  However, I have a situation where we&#039;ve upgraded to CRM 4.0 and what worked in 3.0 no longer does.  </p>
<p>We have cases where we must use to.addressused and cc.addressused in order to use an email string rather than a Guid.  In the case of cc.addressused I was able to string together multiple email addresses seperated by a semi-colon and plug that in.  However, since our upgrade I can no longer do that.  cc.addressused only allows for a single address. </p>
<p>I&#039;ve never used torecipients so am unfamiliar with this.  It doesn&#039;t appear based on the posts above that it would solve my issue.  Have you ever seen this before and if so do you have any thoughts?</p>
<p>Thanks, Andrew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1300</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 21 Oct 2008 12:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1300</guid>
		<description>Hi Mitch

I've drawn on this post a lot recently. I am constructing a process to allow bulk emails with attachments. Most of the challenge is handling the user experience rather than the mechanics of constructing the emails, however I'm encountering a problem:

I'm create an instance of the SDK email object and setting description, subject and sender all OK. I then create a quick campaign programmatically and populate Activity = my email instance, ListId to a valid marketing list guid, FriendlyName (some text) then, importantly I set Propagate = false and sendEmail = false. My understanding is that Propagate = false shuld attempt to actually send the email messages out once they are created. sendEmail determines (i think) whether a notification is sent to the QC owner. 

My problem? If Propagate = true, QC is created, so too are all emails (all look fine with correct content etc) but not sent out - as expected.

If Propagate = false, QC is created then aborted, no emails are created and error message, deep in logs, states "Must specify a valid Template Id, ErrorCode: -2147220717".

Any idea why I need a templateId? I'm a bit confused as they SDK is all a bit vague about the Propagate/sendEmail properties...</description>
		<content:encoded><![CDATA[<p>Hi Mitch</p>
<p>I&#039;ve drawn on this post a lot recently. I am constructing a process to allow bulk emails with attachments. Most of the challenge is handling the user experience rather than the mechanics of constructing the emails, however I&#039;m encountering a problem:</p>
<p>I&#039;m create an instance of the SDK email object and setting description, subject and sender all OK. I then create a quick campaign programmatically and populate Activity = my email instance, ListId to a valid marketing list guid, FriendlyName (some text) then, importantly I set Propagate = false and sendEmail = false. My understanding is that Propagate = false shuld attempt to actually send the email messages out once they are created. sendEmail determines (i think) whether a notification is sent to the QC owner. </p>
<p>My problem? If Propagate = true, QC is created, so too are all emails (all look fine with correct content etc) but not sent out - as expected.</p>
<p>If Propagate = false, QC is created then aborted, no emails are created and error message, deep in logs, states &#034;Must specify a valid Template Id, ErrorCode: -2147220717&#034;.</p>
<p>Any idea why I need a templateId? I&#039;m a bit confused as they SDK is all a bit vague about the Propagate/sendEmail properties&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mitch</title>
		<link>http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1296</link>
		<dc:creator>mitch</dc:creator>
		<pubDate>Sat, 11 Oct 2008 19:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.infinite-x.net/2007/04/15/working-with-crm-emails/#comment-1296</guid>
		<description>just add more people to the activityparty list.</description>
		<content:encoded><![CDATA[<p>just add more people to the activityparty list.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
