We are using a code snippet like the one below to create a new email campaign. Our client uses verified email addresses at a domain like this example@domainwith-dash.com. When they try to create the campaign using this domain as their FROM address, the API returns: Please enter a valid email address. When we verify and use a different FROM email address with a different domain (without the hyphen), and use the same code the email processes through the API without error. Is there something we need to do to encode the FROM email address to pass through and be validated correctly by the API? Or is it possible something else could be the cause? Thanks in advance for any help people can provide. public function createCampaign($lists, $campaign_title, $subject, $from_name, $from_email, $content_html, $content_text, $reply_to){
$this->error = '';
$camp_result['success'] = true;
$camp_result['error'] = '';
$camp_result['cid'] = 0;
$campaign = new Campaign();
$campaign->name = $campaign_title;
$campaign->subject = $subject;
$campaign->from_name = $from_name;
$campaign->from_email = $from_email;
$campaign->reply_to_email = $reply_to;
$campaign->text_content = '<text>' . $content_text. '</text>';
$campaign->email_content = "<html><body>" .$content_html. "<OpenTracking/></body></html>";
$campaign->email_content_format = "HTML";
$campaign->greeting_name = 'FIRST_NAME';
$campaign->greeting_salutations = 'Dear';
$campaign->greeting_string = '';
// add the selected list or lists to the campaign
if ($lists) {
foreach ($lists as $list) {
$campaign->addList($list);
}
}
... View more