F
francan00
When I send mail in my Java it always outputs the from address with
the email address as it should where the email goes to the person and
the person can reply back to the sender email address:
From: (e-mail address removed)
To: (e-mail address removed)
Subject: Hello World
I would like to display the name and also have their email address
available so the person can reply back to it:
From: John Smith <[email protected]>
To: (e-mail address removed)
Subject: Hello World
I was wondering if I could use this: to="John Smith <[email protected]>"
My current email program:
String to = "(e-mail address removed)";
String from = "(e-mail address removed)";
String host = "smtp.mycompany.net";
Properties props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.debug", "true");
Session session = Session.getInstance(props);
try {
// Instantiatee a message
Message msg = new MimeMessage(session);
....
Please advise.
the email address as it should where the email goes to the person and
the person can reply back to the sender email address:
From: (e-mail address removed)
To: (e-mail address removed)
Subject: Hello World
I would like to display the name and also have their email address
available so the person can reply back to it:
From: John Smith <[email protected]>
To: (e-mail address removed)
Subject: Hello World
I was wondering if I could use this: to="John Smith <[email protected]>"
My current email program:
String to = "(e-mail address removed)";
String from = "(e-mail address removed)";
String host = "smtp.mycompany.net";
Properties props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.debug", "true");
Session session = Session.getInstance(props);
try {
// Instantiatee a message
Message msg = new MimeMessage(session);
....
Please advise.