Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending email such that "from" is a name or text rather than real email address

I am sending email using Java Mail API. When the email is received in the inbox its shows the email address used to send the email. I want to hide the from email address and show some text. I think its possible because when I get an email from facebook, in the inbox it says "Facebook - Email subject" rather than "[email protected] - Email Subject".

I want to do the same using Java Mail API.

Thanks in advance. :)

like image 243
Zaheer Baloch Avatar asked Jul 17 '09 16:07

Zaheer Baloch


People also ask

What is the name for emails that are sent to users pretending to be from their bank and asking for username and password?

Phishing attacks typically rely on social networking techniques applied to email or other electronic communication methods. Some methods include direct messages sent over social networks and SMS text messages.

What type is email spoofing?

Email spoofing is a technique used in spam and phishing attacks to trick users into thinking a message came from a person or entity they either know or can trust. In spoofing attacks, the sender forges email headers so that client software displays the fraudulent sender address, which most users take at face value.

What is spoofing and phishing?

Phishing schemes often use spoofing techniques to lure you in and get you to take the bait. These scams are designed to trick you into giving information to criminals that they shouldn't have access to.

What term is used to describe when someone sends an email with a fake address in order to waste the victim's time or damage the victim's reputation?

Phishing is a type of social engineering where an attacker sends a fraudulent (e.g., spoofed, fake, or otherwise deceptive) message designed to trick a person into revealing sensitive information to the attacker or to deploy malicious software on the victim's infrastructure like ransomware.


1 Answers

Use the Constructor

InternetAddress(String address, String personal)

when building your sender address. In your example this would be

sender = new InternetAddress("[email protected]","Facebook");
like image 70
Wolf Avatar answered Sep 25 '22 16:09

Wolf