I am trying to send a spoofed email using gmail. before people freak out, no I am not spamming anybody (if you have to know why, an explanation is below). Using this question and answer, I was able to send a test email to myself with a spoofed to address (it appeared as I wanted), however, regardless of what I enter in the MAIL FROM
field or the From:
field in the DATA
, it always appears from the address I used to authenticate.
My question is whether it's possible to spoof the from address as well. The goal would be for the from address to appear as something other than an email address. (again, explanation is below)
EXPLANATION
For those who want to know why I am doing this, my brother recently got promoted, and he and I are both fans of the show How I Met Your Mother. As such, I would like to send him a The Bro Code approved congratulatory email, which is required to be of the form:
To: Bro
From: Bro
Subject: Bro!
Nice, Bro!
Therefore, I need the From address to appear to be simply "Bro"
I believe the short answer is no.
Email headers are just text, so if you are using sendmail or something, you can use whatever you want. However, it might (see: will likely) end up in his spam folder.
Gmail needs to protect it's reputation, so they will always add a breadcrumb to say who actually sent the email. For instance, you can setup gmail to send email "from" non-gmail addresses, but the message will be sent from your gmail address "on behalf" of your non-gmail address.