wood burning stoves*
The moose likes Other JSE/JEE APIs and the fly likes square bracket in send mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "square bracket in send mail" Watch "square bracket in send mail" New topic

square bracket in send mail

Rekha Pande
Ranch Hand

Joined: Jan 29, 2004
Posts: 145
Hi all

When ever a user posts a request through my application, a mail is usually sent out to them stating that their request is recorded and other details.

But in my send mail usually the email address that goes to the user is like this : applicationemail.domain.com

right now, i have the need to change the email address that goes to the user as: Application Name [applicationemail.domain.com]...
How would i do this..!!???

If i try to write the string "Application Name [applicationemail.domain.com]" in the from address, it gives me an error:
Illegal White spaces and If i remove the white spaces then it gives me the error - Illegal Character in local name

So please can some one guide me on how to send email with the from Address as : Application Name [applicationname@domain.com] .
Just the same way, when we send a email from MS outlook, the email address is usually of the format "USER NAME [USER EMAIL ADDRESS]"

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60773

Moved to the Other Java APIs forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rekha Pande
Ranch Hand

Joined: Jan 29, 2004
Posts: 145
Any suggestion as to how i can set the from address in the email that i sent from java mail to be:
FULL NAME [fullname@address.com]
Rekha Pande
Ranch Hand

Joined: Jan 29, 2004
Posts: 145
Ok, i have solved my problem. Just for every ones information,
When we write
"full name<emailaddress.com>" in the from address of java mail, then the email when viewed by the recepient will show the reply to address as
"full name [emailaddress.com]".

Thanxs any ways
I agree. Here's the link: http://aspose.com/file-tools
subject: square bracket in send mail
Similar Threads
JavaMail: Address with white space
How to increase speed of mail process
Get Email Address
Please Help!! Failed to send email from J2EE app, Jboss 4.2.3 server
Sending a message from a sender's email id to receivers email id without authentication