Skip to content Skip to sidebar Skip to footer

Trying To Spoof An Email Address

I'm sure this has been asked, but I can't find anything to get mine to work. I'm trying to send follow up emails to clients, but I want to spoof the email address so the from addre

Solution 1:

The very short version: This isn't going to work.


Once upon a time, it was reasonably possible to do what you are asking to do. In the old days, when the internet was small and spam did not exist, the receiving server would just trust you. You could just connect to mail.example.com and say you were sending on behalf of someone@example.org, and example.com would just believe you.

But those days are over and done with. Nowadays, SMTP servers are a lot less trusting. So let's go through the problems with your approach:

  1. You are trying to route your email through outlook.com. outlook.com knows perfectly well that you are username and not other_email. If you want to send email as other_email, you need to authenticate as other_email.
  2. You could connect directly to gmail.com, claim to be outlook.com, and try to send the email that way. But Gmail knows you're not outlook.com, because you're missing these things. So it will likely flag your message as spam, bounce it, or even* accept it and then discard it entirely.

You could fix (1) by changing your code, but because of (2), there's little point.

* I do not work on the Gmail team. I am guessing how Gmail would respond to this based solely on public information about how modern email servers are typically configured. YMMV.

Post a Comment for "Trying To Spoof An Email Address"