You almost certainly cannot.
I have just sent emails to myself with Gmail. Once using Windows Live Mail and once using the Gmail web interface.
The one sent from Windows Live Mail looks like a regular email header and has a received from address. However, I use a BT Broadband service and the IP address resolves to the external IP address BT gave my router. The text does reveal the name I gave the laptop I used, but not the IP address it actually has which is, of course, NAT’ed. And there are, of course, a dozen or more devices hanging off the router.
The webmail sent version has a much more simple header with absolutely no IP addresses or host names.
I would suspect Hotmail and Google to be similar.
This level of information will be the same where ever you are on a private network accessing the Internet through a gateway router using NAT, unless you have a real Internet IP address allocated to your machine – which is rare since domestic services started to late to be so generous with them and most companies would regard machines visible from the Internet to be a risk.
And then there is carrier level NATs where it could be that the IP is obscured again as it is transmitted from my laptops email client to the Gmail service.
For this to be useful, it assumes that your email client is on a device with a constant IP address. As shown above, for Broadband and Private Networks, this is probably only a constant NAT address. For mobile devices on 3G/4G etc the IP address can change from one minute to another. Just tried sending a couple of Gmail messages sent using my iPhone’s mail client and O2 network (actually reporting using GPRS at the time of the messages). The place in the received from text which previously carried my routers external IP address now has a differernt IP address in each message – both are from the same range, the first 3 octets are the same, but they are also both different to the IP address reported by Google on the “whats my IP address”.
There is also a 10.x.x.x range address on the received-from line. This could be the actual IP address of the phone on the carrier’s private mobile IP network. However, I do not know this for sure and while it was the same for the earlier two email messages, I switched the phone to flight mode and back to disconnect from the mobile network. A 3rd email then sent had new IP addresses (the 10.x.x.x and O2 external address) on the received-from line that were different from the previous messages.
Therefore, if the webmail interface is used, there is no way to track back to the source IP address (and anyway, it could have been any machine attached to the Internet with a browser). If a regular email client is used then you will get an IP address, but it will be either the external facing address of the last NAT service before reaching the email provider or, in the case of a mobile operator, it could be a transitory IP address which is even less useful – unless you have precise times of email sends and can access a log of which IP address the phone had at what time … which if it does exist, may not be retained for long.
(And that’s before we get onto to ‘custom’ set-ups where the received-from field could be ‘managed’ – this seemed to be a popular ruse about 10 years ago with spam.)
I was checking the email headers using Windows Live Mail (W10) in each case to the Gmail emails. From the 1 line summary I would right click on the email and select Properties. On the Properties dialog, I would click ‘Details’ to see the header information.
This is also a useful way to screen suspicious emails that look like they came from someone you know. Looking at the recieved-from text will often reveal some very unusual urls and allow the fraudulent emails to be safe disposed of without actually opening them.