cancel
Showing results for 
Search instead for 
Did you mean: 

C#, ASP.NET Email Question

SOLVED
Occasional Contributor

C#, ASP.NET Email Question

My company is in the process of evaluating Constant Contact as a replacement to our current email/listserv service provider. We currenty generate all of our emails using a custom C# program that we developed. We're taking this approach because the contents of our emails are all generated dynamically based on the various calendar events at my organization.

 

My question is whether or not this is something that is supported by the Constant Contact. From what I've seen so far, it looks like any email that is sent through Constant Contact should originate through the admin interface that you provide. Is this assumption correct?

 

I guess I'm looking for something like a javascript snippet or something that we can just insert into our dynamically generated email messages that will allow us to leverage all of the Constant Contact metrics and tools that are used to track how people are viewing our email messages? Is this even possible with Constant Contact or is there another option that will allow us to do something along these lines?

3 REPLIES 3
CTCT Employee

Re: C#, ASP.NET Email Question

Hi,

 

Yes, what you are looking to do is possible.  You can create custom html email through the API by providing the encoded HTML you generate and posting it to your account.  The XML generated looks like this (with your own content inside the EmailContents node):

 

<entry xmlns="http://www.w3.org/2005/Atom">
  <id>http://api.constantcontact.com/ws/customers/joesflowers/campaigns/0</id>
  <title type="text">My first Constant Contact email</title>
  <updated>2011-04-25T13:53:04.243Z</updated>
  <content type="application/vnd.ctct+xml">
    <Campaign xmlns="http://ws.constantcontact.com/ns/1.0/">
      <Name>Created via API</Name>
      <Subject>News from Joe's Flowers</Subject>
      <FromName>Joe's Flowers</FromName>
      <ViewAsWebpage>NO</ViewAsWebpage>
      <PermissionReminder>NO</PermissionReminder>
      <OrganizationName>Joe's Flowers</OrganizationName>
      <OrganizationAddress1>123 Main Streed</OrganizationAddress1>
      <OrganizationAddress2></OrganizationAddress2>
      <OrganizationAddress3></OrganizationAddress3>
      <OrganizationCity>Waltham</OrganizationCity>
      <OrganizationState>MA</OrganizationState>
      <OrganizationInternationalState></OrganizationInternationalState>
      <OrganizationCountry>US</OrganizationCountry>
      <OrganizationPostalCode>02452</OrganizationPostalCode>
      <IncludeForwardEmail>NO</IncludeForwardEmail>
      <IncludeSubscribeLink>NO</IncludeSubscribeLink>
      <EmailContentFormat>HTML</EmailContentFormat>
      <EmailContent>
        &lt;html>
          &lt;body>Hello!
          &lt;/body>
        &lt;/html>
      </EmailContent>
      <EmailTextContent>Hi There</EmailTextContent>
      <FromEmail>
        <Email id="http://api.constantcontact.com/ws/customers/joesflowers/settings/emailaddresses/1">
        </Email>
        <EmailAddress>joe@somedomain.com</EmailAddress>
      </FromEmail>
      <ReplyToEmail>
        <Email id="http://api.constantcontact.com/ws/customers/joesflowers/settings/emailaddresses/1">
        </Email>
        <EmailAddress>joe@somedomain.com</EmailAddress>
      </ReplyToEmail>
    </Campaign>
  </content>
  <source>
    <author>
      <name>joesflowers</name>
    </author>
  </source>
</entry>

 

Here is a link to a code sample that generates an email.  We don't have a javascript example--that one is PHP.

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Occasional Contributor

Re: C#, ASP.NET Email Question

Thanks for the speedy response Shannon. I understand the approach that you are describing, but what I was asking is an entirely different approach. I don't think that I explained it very well. My apologies!

 

I'm curious as to whether or not, we can just generate the email message on or own (without using your API), but somehow be able to leverage the metrics and tools that Constant Contact provides with the email campaigns. That is why I was asking about javascript, as I just assumed a javascript snippet that we inserted into our html would be the most logical choice to be able to do this.

 

I guess this isn't an option?

CTCT Employee

Re: C#, ASP.NET Email Question

Hi,

 

I see what you mean--sorry I misunderstood.  You're correct, we don't currently have a way to provide our metrics on an email sent outside our system.  I might recommend Google Analytics to provide some of that.  They can't provide bounce/open information to my knowledge, but you could track traffic to your website generated from email campaigns.

 

Sorry about that!

 

Best Regards,

Shannon W.

API Support Specialist