Cómo enviar invitaciones de iCal (Calendario) a Outlook

Al enviar invitaciones con iCal de Apple, el destinatario recibe un email con archivo adjunto .ics para añadir el evento a su calendario y aceptar/rechazar. Al enviarlas a usuario de Outlook, la funcionalidad se pierde en la traducción y no se formatea ni accede correctamente. Editar cómo iCal envía invitaciones, aunque laborioso, mejora la interacción Mac–PC.

Paso 1

Abre carpeta Aplicaciones. Navega a iCal. Clic derecho (Control+clic) en el icono > "Mostrar contenido del paquete".

Paso 2

Navega a "Resources" (Recursos). Dentro, localiza "Mail.applescript".

Paso 3

Selecciona "Mail.applescript". En barra de menú: Editar > Copiar. En Escritorio, Editar > Pegar como respaldo. Vuelve al original.

Paso 4

Clic derecho en el archivo > "Abrir con Editor AppleScript". Se abrirá el Editor.

Paso 5

Ve a mitad del script al encabezado on send_mail_sbrp(subjectLine, messageText, myrecipient, invitationPath). Selecciona toda la sección desde ese encabezado hasta end send_mail_sbrp y pulsa Supr. (Tienes respaldo del Paso 3).

Paso 6

Copia y pega el siguiente bloque completo en AppleScript en lugar de lo borrado:

on send_mail_sbrp(subjectLine, messageText, myrecipient, invitationPath)
  set pfile to POSIX file invitationPath
  set myfile to pfile as alias
  try
    set cr to (ASCII character 13) & (ASCII character 10)
    set listOfAccounts to {}
    tell application "Mail"
      repeat with oneAccount in every account
        set listOfAccounts to listOfAccounts & {"\"" & (get full name in oneAccount) & "\" <" & (get email addresses in oneAccount) & ">"}
      end repeat
    end tell
    if ((get length of listOfAccounts) is 1) then
      set theAccountTouse to get first item of listOfAccounts
    else
      set theAccountTouse to choose from list listOfAccounts default items (get first item of listOfAccounts) with prompt "Please select which mail account to send the invitation from:" without multiple selections allowed and empty selection allowed
    end if
    set myEventFileHandle to open for access myfile without write permission
    set myEventFileContent to read myEventFileHandle
    close myEventFileHandle
    set myNewEmailText to "Subject: " & subjectLine & cr & "From: " & theAccountTouse & cr & "To: " & myrecipient & cr & "content-class: urn:content-classes:calendarmessage" & cr & "Content-Type: text/calendar;" & cr & " method=REQUEST;" & cr & " name=\"meeting.ics\"" & cr & "Content-Transfer-Encoding: 8bit" & cr & cr & myEventFileContent
    set tempMailName to (random number from 1 to 1000000) & ".ics"
    set aliasTempMail to "/tmp/" & tempMailName
    set myEventFileHandle to open for access (POSIX file aliasTempMail as string) with write permission
    write myNewEmailText starting at 1 to myEventFileHandle
    close myEventFileHandle
    do shell script "sendmail < " & aliasTempMail
    do shell script "rm " & aliasTempMail
  on error errMsg
    display dialog errMsg
  end try
end send_mail_sbrp

Paso 7

Selecciona "Compilar" en la barra de herramientas. "Guardar" y cierra AppleScript.

Paso 8

Envía una invitación de iCal. El usuario de Windows con Outlook la recibirá correctamente ahora.

Advertencia

Ten mucho cuidado editando el AppleScript. Si hay error, reemplaza "mail.applescript" en Resources de iCal con el respaldo del escritorio y vuelve a empezar.