SC_email_rc not working


I configured an AfterInsertEvent so that it can send an email, but when I run it I get error.

$message = ‘Buen día,
Se acaba de registrar el alta COVID del colaborador’.{Nomina}.’ ‘.{Nombre}.‘el día’.{Fecha}.’ en la unidad '.{Unidad}.‘
Valida reincorporación:’.{Valido_Reincorporacion}‘


$mail_smtp_server = ‘’;
$mail_smtp_user = ‘’;
$mail_smtp_pass = ‘’;
$mail_from = ‘’;
$mail_to = ‘’;
$mail_subject = ‘Nueva acción registrada’;
$mail_message = $message;
$mail_format = ‘’;
$mail_copies = ‘’
$mail_tp_copies = ‘’;
$mail_port = ‘’;
$mail_tp_connection = ‘’;


Not a good idea to place your smtp password in the forum. I suggest you change it immediately

1 Like

Thank you, didn’t realize I copied the wrong note I wanted to put

I have the same problem, I can not send email.
I have tried the macro and none of them work. However and tried with other platforms and if it sends the mail. I think there is an error is scriptcase

Mine works perfectly without a problem.
In my case I was using gmail and had to allow less secure apps settings for it work. I suspect that there is some security settings on the email server side you need to check.
Have you tried using another application to test with?

1 Like

On a closer look at the code I noticed a syntax error in the $message variable. There should be a full stop (concatenation) between the } and ’ ie .{Valido_Reincorporacion}.‘

I suggest that you first change the $message to something easy .EG $message = ‘Message Body’ and test again.

I also noted that $mail_copies = ‘’ does not have a ; semicolon at the end of the line

I did this changes and it worked! thank you so much