I have a simple php form in my block with just the email field to subscribe to the newletter.

I would like to automatically add this email to the contact contact list.

I am using curl to do the operations and it throws me a 500 error.

Any help is appreciated.

http://pastebin.com/b8iLpgGX

Comments

=-=

This question belongs in the module developer and code questions forum. Please edit the opening post and move it.

It would also behoove you to post your code to pastebin.com and link it to the question

Solution

I finally used the PHP Library available.

Copied the four(Authentication,Collections, Components and ConstantContact) class files to the root directory

In the block where I have the form. I added the "Add Contact"(modified code that is available in the zip file as well) code on submit and it worked