0

Email multiple BCC receivers.

Does anyone know what is wrong with this code?

let sender := userEmail();
let bcc := "receiver2@mail.com, receiver3@mail.com";
let receiver := "receiver1@mail.com";
let subj := Subject-textfield;
let txt := "";
let body := raw(RTF-field);
sendEmail({
    from: sender,
    to: receiver,
    bcc: bcc,
    subject: subj,
    text: txt,
    html: body
})

Only receiver 1 and receiver 3 getting an email. receiver 2 doesn't. (always the last and only one in line)

In other words, how do I send an email to multiple receivers?

4 replies

null
    • red_kite
    • 4 mths ago
    • Reported - view

    Hi Steven. Try to put all mail-adress in an array.

    let bcc := ["receiver2@mail.com", "receiver3@mail.com"];
    
      • Ninox partner
      • RoSoft_Steven.1
      • 4 mths ago
      • Reported - view

      Thanks, this works perfect.

      I use an email field with multiple recipients in it, separated by commas. I then use the split function to convert them to an array: let bcc := split(BCCMail,",")  Now it works.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 11 hrs ago
      • Reported - view

       

      Hi Steven.

      I find this to send multiple email. On line 10 'Asignar Lideres de Disciplinas is a Multiple Choice Dynamic. Select and send multiple emails.

      let ref := "Nombre del nuevo Proyecto: " + Nombre_Proyecto;
      let text := "Hola, Se ha adjudicado un nuevo Proyecto.  Nombre del proyecto: " +
          Nombre_Proyecto +
          " Descripcion: " +
          Descripcion_Proyecto +
          "Fecha de Inicio " +
          'Fecha Finalizacion' +
          " Saludos ";
      let me := this;
      let allNames := (select 'Lideres Disciplinas' where contains(numbers(me.'Asignar Lideres Disciplina'), number(Id))).'Nombre Empleado';
      let listadestinatarios := (select 'Lideres Disciplinas' where contains(allNames, 'Nombre Empleado')).text(Email);
      if cnt(listadestinatarios) > 0 then
          sendEmail({
              from: "rafael.sanchis@gmail.com",
              to: listadestinatarios,
              subject: ref,
              text: text,
              html: ""
          });
          alert("Se envió un correo electrónico a estos lideres de Disciplina: " +
          "
      " +
          join(listadestinatarios, "
      "))
      end
      
    • Rafael Sanchis
    • Rafael_Sanchis
    • 4 mths ago
    • Reported - view

    Because emails are received in spam ? Some ideas

Content aside

  • Status Answered
  • 11 hrs agoLast active
  • 4Replies
  • 67Views
  • 3 Following