Question

I am using infusionsoft API for email functionality, I don't know how to make a merge filed for to the address I am to send email. This is the API

"https://github.com/infusionsoft/PHP-iSDK"

this is the example given in documentation, but it is not giving any result.

$toAddress = "~Contact.Email~";

How can I make any of my email address's to merge field.

Was it helpful?

Solution

Merge field values are only changed to the user's actual address when the email is in the queue to be sent. (You will never see this)

When calling EmailService.sendEmail you will need to specify which field on the contact record contains the email address you want to send to.

The documentation states:

toAddress string The email address this template sends to. Typically this will be "~Contact.Email~"

You can use the following for the other email address fields on a contact record. ~Contact.EmailAddress2~ ~Contact.EmailAddress3~

To send the email you can use the following:

$clist = array(123,456,789); 
$status = $app->sendEmail($clist,"Test@test.com","~Contact.Email~", "","","Text","Test Subject","","This is the body");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top