AnsweredAssumed Answered

How to set Opt Out for invalid Emails through Logic Hook using beans?

Question asked by Abhi Abhi on Dec 3, 2014
Latest reply on Dec 3, 2014 by Abhi Abhi
Using CE 6.5 I have an after_save logic hook which will send the mail as follow 

function mail_chk(&$focus, $event, $arguments)
    $emailObj = new Email();
    // echo '
    // print_r($emailObj);
    echo '
    echo $focus->opt_out = 1 ;
    // $focus->webtolead_email_opt_out = 1;
    $defaults = $emailObj->getSystemDefaultEmail();
    $mail_c = new SugarPHPMailer();
    $mail_c->From = $defaults['email'];
    $mail_c->FromName = $defaults['name'];
    $mail_c->Subject = "Greetings From Salusfin";
    $mail_c->Body = "Thank you very much for contacting us and interest in our products, our marketing team will get back to you as soon as possible";

}  want to do something like                                            if email if failed to send                                            than set that mail to opt_out

is there any way to set opt_out email for leads using beans in logic hook  ??????