• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is the "From" Email Address Necessary?

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing a web site. Users of this web site can send e-mails. And the JavaMail is deployed to facilitate this feature.

A 'form' is provided for users to send e-mails. And the form has these text fields: From, To, Subject, Message.

I am going to use getRemoteUser() to obtain the userID of the person who is sending e-mails and fill out the 'From' text field with this userID.

Does the 'From' has to be an e-mail address in order to use the JavaMail standard send message code? In my case, users do not have to fill out their own e-mail addresses. Their userID gets entered in the 'From' text field automatically.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Does the 'From' has to be an e-mail address in order to use the JavaMail standard send message code?


No - it can be anything you like. But your SMTP server might have restrictions on this.
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic