@Mailsend with a list

Hi!.I’ve got a problem using @Mailsend, my platform is R5 and I´ve got my code to send emails in an Action Button.

I’m using a @dblookup to find the senders.

Code:

var1:=@DbLookup(“”:“NoCache”;“”:“”;“UnidResolCN”;Area;2;[FailSilent]);

Result: Andreina Lucia Morales/BTO/CASAPROPIA; Freddy Alberto Mogollon/BTO/CASAPROPIA; Jackson Ferrer/BTO/CASAPROPIA

To format the list I use the following.

Code:

MailTo:=@Char(34)+@ReplaceSubstring(@Implode(var1);"CASAPROPIA ";“CASAPROPIA;”)+@Char(34);

Result: “Andreina Lucia Morales/BTO/CASAPROPIA”:“Freddy Alberto Mogollon/BTO/CASAPROPIA”:“Jackson Ferrer/BTO/CASAPROPIA”

The code to send the email is this:

@If((@IsMember(“[Revisor11]”;@UserRoles) & (Status =“Iniciada”));@MailSend(MailTo;“” ;“” ;“Prueba Solicitud de Requisición de Trabajo.”; "Esta solicitud de Requisicion de Trabajo es de prueba y fue realizada el " +@Text(@Now)+@NewLine+“Se le envia la siguiente solicitud para su procesamiento. No olvide realizar el analisis de la requisición.” + @NewLine + @NewLine;“Si desea revisar la Solicitud de Requisicion de Trabajo en este instante revise el documento anexo---->”; [IncludeDoclink]);@Success);

When I tried to uses the action, I get the pop up : The name is not in a directory but if I compere the names inside the list with their entries in the N&B, are 100% the same. I’ve been trying with everything, but nothing works. If I take the result after the format and put it in the parameters of the @Mailsend “SentoTo”, it works perfectly, Example:

@If((@IsMember(“[Revisor11]”;@UserRoles) & (Status =“Iniciada”));@MailSend(“Andreina Lucia Morales/BTO/CASAPROPIA”:“Freddy Alberto Mogollon/BTO/CASAPROPIA”:“Jackson Ferrer/BTO/CASAPROPIA”;“” ;“” ;“Prueba Solicitud de Requisición de Trabajo.”; "Esta solicitud de Requisicion de Trabajo es de prueba y fue realizada el " +@Text(@Now)+@NewLine+“Se le envia la siguiente solicitud para su procesamiento. No olvide realizar el analisis de la requisición.” + @NewLine + @NewLine;“Si desea revisar la Solicitud de Requisicion de Trabajo en este instante revise el documento anexo---->”; [IncludeDoclink]);@Success);

Also If I use just one person in my list, works perfectly.

So I d not what to do to make it works, If someone can help my, I’m gonna be so grateful.

Subject: @Mailsend with a list

You are creating a single string with “:” where “;” used to be. Use @Explode instead – it will create a list from a string.

Subject: RE: @Mailsend with a list

Thank you so much for your help, I made the change you suggested and now my code is working perfectly.

Thanks one more time.