IP Address when receiving email through Able Commerce?

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
louderback
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Tue Nov 11, 2008 10:47 am
Location: Los Angeles

IP Address when receiving email through Able Commerce?

Post by louderback » Mon May 18, 2009 5:12 am

Does anybody know how to imprint someone's IP Address when receiving email through Able Commerce?

Thanks'
Edward

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: IP Address when receiving email through Able Commerce?

Post by mazhar » Mon May 18, 2009 8:28 am

Try following code to find IP address.

Code: Select all

string ipAddress = Request.ServerVariables["REMOTE_ADDR"];

louderback
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Tue Nov 11, 2008 10:47 am
Location: Los Angeles

Re: IP Address when receiving email through Able Commerce?

Post by louderback » Tue Jun 02, 2009 4:53 pm

hi Mazhar,
how about more information like ISP, country/state, time...?

Thanks'
Edward


:?: :)

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: IP Address when receiving email through Able Commerce?

Post by mazhar » Wed Jun 03, 2009 3:06 am

Other information could be achieved via some GEO IP service. I have posted a sample in following thread
viewtopic.php?f=47&t=10870

You can extract zip file available in that thread and place GeoLocationHelper in your app code. Then when sending Email you can first get customer IP with trick discussed above and then make a call to

Code: Select all

string ipAddress = Request.ServerVariables["REMOTE_ADDR"]; 
string geoIpInfo = GeoLocationHelper.FindLocationByIP(ipAddress);

//finally you can put some code to add this geoIpInfo string to Email body.


Post Reply