Hi I hope this is the right place for my question.
We are company that has a few branches around the world. I would like to build a web mail service for us but when we will send an e-mail the e-mail header will always appears like as if it was sent from our main office in Hong Kong and always have our main office IP as “sent from”. Is this possible? Can you post a code? Many thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark GilbertSenior Performance EngineerCommented:
Unless you can route your mails through the office in Hong Kong you will not be able to spoof the ip address.  Well, I guess there are ways, but to have such matters disclosed on EE would be a violation of EE's T's & C's.  To spoof an address can be a major security risk, or circumnavigation of various legislations etc, and therefore would be deemed unacceptable information.

If you need the Hong Kongs' IP address, then routing it through those smtp servers would be the route to go.  If you need a set of scripts that lets you define specific servers with authentication etc, then have a look at http://www.phpmailer.org.  This is a very useful set of classes to handle your mails and has a very powerful range of features.

Hope this helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
2AngelAuthor Commented:
Thank you very much for your comment.
 My question is not in any how EE violation because I want to use my own IP.
Any way, I will look in to your suggestion.
By The Way, when I use a free webmail like gmail yahoo or hotmail the first IP in the email header is my own client/pc although the webmail server is in another country - why is that? can I change it to my private static IP?
Mark GilbertSenior Performance EngineerCommented:
Hi Angel,

I know that you are trying to use your own IP in the headers of your email, and if you are able to "spoof" your Hong Kong IP's then that's great, just something experts at EE can't tell you how to do.

When you use free webmail accounts, they will automatically retrieve the ip address that you are signing into their services for the reasons that were kind of mentioned in my first email.  Each and every connection on the internet should have it's own IP address.  If you are using corporate networks, chances are you will have the same ip as everyone else.  If you are using wireless ip addresses at an airport, the ip would be shared amongst many users.  IP addresses help identify a specific person connected to the network at a specific time, and is tracable.  Therefore, to spoof an address, which may be your own in another location is still a very grey area, because it's not that specific connection that you are using at the time you are sending a message, if you are in a remote area from the corporate network.

You are not supposed to change assigned IP addresses, and that is classed as spoofing...it's not right.  If you have static IP addresses assigned to you by your ISP then you may assign those to your computer.  So long as they are correctly routed for the network you are using then there is no problem "assigning" the ip as it is one that has been allocated to you to use for that network.  If you are using an ip from Hong Kong however, and you are in New York, if you are not remotely dialing into your corporate network, it would be considered a spoof to assign the Hong Kong Ip address to your New York address.  

I hope this clarifies the situation.  If any experts feel I have left anything out, please do share your comments and help me out :)
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Learn sendmail and m4? You can do whatever you want then as an old man...
2AngelAuthor Commented:
ingwa: The link http://www.phpmailer.org - is not valid....
wakemup: Thank you very much! It is a new "world" for me. Is a easy fast way to learn this?
Mark GilbertSenior Performance EngineerCommented:
Oops, sorry Angel.  Try this one:  http://phpmailer.sourceforge.net/
2AngelAuthor Commented:
Is this command/script only for the client side?
Is it only for Linux?
Do I need a Linux server?
Mark GilbertSenior Performance EngineerCommented:
Hi 2Angel,

I was going through my history and noticed this still hasn't been resolved for you so please accept my apologies and here are some answers to your questions:

Is this command/script only for the client side? No, this is a set of php classes and you use the examples provided on their site to build your own custom mailing form.
Is it only for Linux? No, php can run in various environments and as long as it's been correctly installed/compiled it will run the classes too.
Do I need a Linux server? No, as above all you need to be able to run is a webserver that has been configured to run with php.

I hope this helps and good luck with your project.
2AngelAuthor Commented:
Thanks for all but at the end I opened an email account on our website host company...
Although I didn't got a direct answer I'll split the points...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.