A simple program written in C# to clear contact suggestions in iCloud Mail and the stock Mail app on Apple devices.
todo: improve
First, clone this repository. cd
into the directory (into the second ClearAppleMailSuggestions
, where you see the text files), then follow the steps below:
- Go to icloud.com/mail and log in
- Open your browser's developer tools and switch to the Network tab
- Press Compose, and type anything into the
To:
field; your goal is to see suggestions - Press the red 'delete'/minus button next to any suggestion
- In DevTools, find a
DELETE
request tohttps://pXXX-mcc.icloud.com...
, whereXXX
are random numbers. For example,https://p123-mcc.icloud.com...
. - Copy the value of the
Cookie
header, renamecookies.example.txt
tocookies.txt
, and replace the contents of the file with what you copied (note: cookies should all be on one line, separated by;
) - Copy the URL from the request, rename
url.example.txt
tourl.txt
, and replace the contents of the file with what you copied - In DevTools again, find the
GET
request tohttps://pXX-mcc.icloud.com...
whose response body contains a stringdsId
and a JSON list ofrecipients
, and copy the entire value of the response - Rename
recipients.example.txt
torecipients.txt
and replace the contents of the file with what you copied* - Run the program, and you should see
OK: XX_XXXXX
in your console for each successful request
Once you've set things up, you'll need to use dotnet
to run the program. cd
into the directory, then use dotnet build -c Release
and dotnet run -c Release
.
A. This program is not affiliated with Apple in any way. Use at your own risk.
B. This program isn't guaranteed to work perfectly, as I threw it together quickly with the goal of only using it for myself. I'm also not the best at this kind of thing. If you run into issues you're welcome to open an Issue or contact me (see contact methods on my website).
C. *This program does not save any personal data, but feel free to redact emails, names, etc. The program only reads the
MR_XXX
orGP_XXX
values to send them right back to Apple inDELETE
requests. No data is stored persistently by the program. The same applies for cookies; the program only needs these to authenticate the requests to Apple so that they think you are the one sending them; cookies are not saved, ever. If you're worried, you can sign out of icloud.com afterwards and the cookies will be invalidated.
Big thanks to @spotlightishere for the idea and some guidance!