>> Tecnologia Eletrônica >  >> Casa Inteligente >> Vida Inteligente

Como Enviar Convites iCal para Outlook

Ao enviar convites com iCal da Apple, destinatário recebe e-mail com anexo .ics para adicionar evento ao calendário e aceitar/recusar. Enviando para usuário Outlook, funcionalidade se perde na tradução: não formata/acessa corretamente no Microsoft Outlook. Editar como iCal envia convites, embora trabalhoso, melhora interação Mac-PC.

Passo 1

Abra pasta Aplicativos. Navegue até iCal. Clique com botão direito (Control-clique) no ícone iCal e selecione "Mostrar Conteúdo do Pacote" (Show Package Contents).

Passo 2

Navegue pelo conteúdo do iCal até "Resources" (Recursos). Dentro, localize "Mail.applescript".

Passo 3

Destaque "Mail.applescript". Na barra de menus, "Editar" > "Copiar". Na Área de Trabalho, cole ("Editar" > "Colar") como backup. Volte ao "Mail.applescript" original.

Passo 4

Clique com botão direito no arquivo e selecione "Abrir com AppleScript". Editor AppleScript abrirá.

Passo 5

Navegue até metade do script até o cabeçalho "on send_mail_sbrp(subjectLine, messageText, myrecipient, invitationPath". Destaque toda seção desde esse cabeçalho até "end send_mail_sbrp" e pressione "Delete". (Não se preocupe, fez backup no Passo 3).

Passo 6

Copie e cole a seguinte entrada completa no AppleScript no lugar do que deletou no Passo 5:

on send_mail_sbrp(subjectLine, messageText, myrecipient, invitationPath)
set pfile to POSIX file invitationPath
set myfile to pfile as alias
try
-- define carriage return
set cr to (ASCII character 13) & (ASCII character 10)
-- retrieve user's name and email
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
-- open and read iCal event file to insert into email
set myEventFileHandle to open for access myfile without write permission
set myEventFileContent to read myEventFileHandle
close myEventFileHandle
-- pre-pend mail headers to event contents
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
-- create random event file name
set tempMailName to (random number from 1 to 1000000) & ".ics"
set aliasTempMail to "/tmp/" & tempMailName
-- write new email to temp file
set myEventFileHandle to open for access (POSIX file aliasTempMail as string) with write permission
write myNewEmailText starting at 1 to myEventFileHandle
close myEventFileHandle
-- use SENDMAIL to send file with proper headers
do shell script "sendmail < " & aliasTempMail
-- delete temp file
do shell script "rm " & aliasTempMail
on error errMsg
display dialog errMsg
end try
end send_mail_sbrp

Passo 7

Selecione "Compilar" (Compile) na barra de navegação. "Salvar" (Save) e saia do AppleScript.

Passo 8

Envie convite iCal. Usuário Windows com Outlook receberá corretamente agora.

Aviso

Tenha extremo cuidado editando AppleScript. Se erro, substitua "mail.applescript" na pasta Resources do iCal pelo backup na Área de Trabalho e reinicie do início.

Nota: Este procedimento modifica arquivos de sistema do iCal (versões antigas). No macOS atual, use Calendar.app e compartilhamento via CalDAV/Exchange para melhor compatibilidade com Outlook.