Gmail as JavaMail SMTP server
I have been working with the JavaMail API with Gmail as my host and have a general understanding of how it can be used to send emails. But there are two lines of code that still confuse me. message.setFrom(new InternetAddress(USERNAME)); API says that this is used to "Set the "From" attribute in this Message." But when I delete this line from the code and send the email, the email has no discernible changes from when the line is present. I've assumed this is purposeful on Gmail's part to prevent spam, which leaves me wondering if this is necessary at all when using Gmail as a host. This is