Insert Airmail receiver's name


#21

Glorious. This is why I love KM and these forums. Those of us that don't use apple mail (if that's what it's called still) were missing out on a lot of potential workflows. Many thanks.


#22

I would just do that in the KM Macro, after you have received the results from the AppleScript.

If you use the last script I posted, if there is no recipient name, then you should get a result like this:
,,somename@reply.domain.com


#23

Sorry, I used the last version but I get a blank result:

TO:
EMail:
Hello , thanks for contacting us.

Here's my macro:

Insert Text by Pasting.kmactions (511 B)

Thanks


#24

You uploaded just one Action, not your entire Macro.
You must first select the Macro in the Macro panel, then export/share.

IAC, I would need to see a screenshot of the header part of the Airmail message you are replying to. Or even better, do a manual forward of the message, and get s screenshot of the part which shows the sender's name/address.


#25

Hi,
This has stopped working for me also. Here's a screenshot of the header as I can see it from airmail.
I don't know if this raw source excerpt helps? I've xxx'ed out some details in case of web crawlers (I really don't know the etiquette or best practice with that, but I've done it anyway). This did work when I first tried it.

Return-Path: damianevans74@xxx.com
Received: from Damians-MacBook-Pro.local.mail ([xx.xxx.121.237])
by smtp.gmail.com with ESMTPSA id k7-v6sm7814259wrq.82.2018.06.23.11.12.57
for damian@damianxxx.net
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Sat, 23 Jun 2018 11:12:57 -0700 (PDT)
Sender: Damian Evans damianevans74@xxx.com
Date: Sat, 23 Jun 2018 19:12:26 +0100
From: Damian Evans damian@damianxxx.net
To: Damian Evans damian@damianxxx.net
Message-ID: etPan.5b2e8da8.4ac5673.3ca0@damianxxx.net
Subject: Test email
X-Mailer: Airmail (481)
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="5b2e8da8_46a7053e_3ca0"

--5b2e8da8_46a7053e_3ca0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

This is a test email to myself.

=E2=80=94=E2=80=94
Damian Evans

Keyboard Maestro Actions.kmactions (5.5 KB)


#26

Please ensure that you first create a reply window, then trigger the macro:


#27

Sorry, here's the macro:

Contact ES > (fanold).kmmacros (6.8 KB)

And the screnshot:

Thank you


#28

Thanks,
In my macro, I built the reply in. I also tried taking that out of the macro and replying manually.


#29

OK guys, we will have to run some diagnostics.

  1. Open Airmail, and click on "Reply" to the message where you are having a problem.
  2. Open Script Editor, and run this script:
tell application "System Events"
  tell application process "Airmail" # "Airmail Beta" OR  "Airmail 3"
    tell window 1
      tell scroll area 1
        tell text field 1
          set toRecipStr to (its value of item 1 of static text)
        end tell
        
      end tell
    end tell
  end tell
end tell

return "toRecipStr: ❯❯❯" & toRecipStr & "❮❮❮"

  1. In the Results/Log area of Script Editor, you should find text like this:
    "toRecipStr: ❯❯❯FirstName LastName <somename@domain.com>❮❮❮"
    • But maybe it will be incomplete.
  2. Just copy whatever is there, and post back here.

Once I can see exactly what you are getting from the script, I should be able to fix it. :wink:


#30

Sorry for delay - other things took over but I'd still like to get this working and appreciate the help.

This was the result:
"toRecipStr: ❯❯❯Damian Evans damian@mydomainname.com❮❮❮"


#31

Hi @JMichaelTX,

This has come back on my radar recently as I try to get some new workflows happening. Would you have any advice on how to move it forward? Thanks in advance.