Hi,
We integrated our .NET project to InfusionSoft to create contacts. We could create the contact. However, the contacts’ email status are either “Unconfirmed” or “Non-marketable”. We are unable to send the email to contacts because of this reason.
All API calls to APIEmailService.optIn returned 'False".
.NET SDK we use: Infusionsoft.net/src/InfusionSoft at master · EventDay/Infusionsoft.net · GitHub
XML-RPC: xml-rpc - Keap Developer Portal
We have 4 contact forms, these are the opt-in reasons we use.
- Joined via contact us form.
- Interested in ReceptionistPlus.
- Interested in MyAssistant.
- Interested in Corporate Solutions.
Email address is the value the user entered on contact form which is validated by regular expression too.
Sample code
switch (campaignId)
{
case 512: _infsoft.AddContactToOptin(Request["Email"], "Interested in ReceptionistPlus."); break;
case 331: _infsoft.AddContactToOptin(Request["Email"], "Interested in MyAssistant."); break;
case 399: _infsoft.AddContactToOptin(Request["Email"], "Interested in Corporate Solutions."); break;
}
public bool AddContactToOptin(string Email, string optInReason)
{
return client.EmailService.OptIn(Email, optInReason);
}
public virtual bool OptIn(string email, string optInReason)
{
return Invoke(d => d.OptIn(ApiKey, email, optInReason));
}