AnsweredAssumed Answered

Email relay is not allowed in Sugar Cloud

Question asked by Manisha narwade on Jul 15, 2019

For achieve some functionality, I have created one schedulers, via schedulers, send email to users. But while executing scheduler we are getting below error. 

"SMTP -> ERROR: RCPT TO command failed. Reply: <our_email_address@gmail.com>: Recipient address rejected: Email relay is not allowed in Sugar Cloud

Code: 550 Extended Code: 5.1.1"

 

I have check below points:

1. System email settings,I have sent test email too from system email settings and its working fine.

2. CRON status is Active.

3. I am also receiving emails from other module's default assignment notification email.

4. I have also checked by using another domains.

 

Important point to note is, its working fine on our local instance but facing issue when deploying on client's cloud instance.  

 

 

require_once 'include/SugarPHPMailer.php';
$subject = "XXXXXX";
$emailObj = new Email();
$defaults = $emailObj->getSystemDefaultEmail();
$email = new SugarPHPMailer();
$email->Subject = $subject;
$email->Body = $email_content;
$email->From = $defaults['email'];
$email->FromName = $defaults['name'];
$email->ContentType = "text/html";
$email->AddAddress($email_address);
$email->isHTML(true);
$email->Send();

 

Can anyone please help me to sort it out.

Thanks.!

Outcomes