Board index » jbuilder » Help on mailer.

Help on mailer.


2003-11-04 03:50:47 AM
jbuilder11
Hi there,
I made a sendMessage function in JSP Bean class in order to send message and
it is successful.
The code is like this
Qsmtp mailer = new Qsmtp("smtp.exchange.missouri.edu");
mailer.setFromAddress("www@www.cf.missouri.edu");
mailer.setToAddress(" XXXX@XXXXX.COM ");
mailer.setSubject("Contract Payment.");
mailer.sendmsg();
Here is the request that instead of display the Sender
www@www.cf.missouri.edu, the user likes to display "Project Manager" as the
Sender.
Is it possible to do that?
Thanks ahead!
Richard Li
 
 

Re:Help on mailer.

Hi Owen,
Too bad that it doesn't work.
I guess I need to find info about the Qsmtp. There must be a way to do it.
Thanks anyway!
Richard
"Owen Green" < XXXX@XXXXX.COM >wrote in message
Quote
On Mon, 3 Nov 2003 13:50:47 -0600, Richard Li wrote:

>The code is like this
>Qsmtp mailer = new Qsmtp("smtp.exchange.missouri.edu");
<snip>
>Here is the request that instead of display the Sender
>www@www.cf.missouri.edu, the user likes to display "Project Manager" as
the
>Sender.
>Is it possible to do that?

I'm not familar with the Qsmtp class, but if it accepts any valid RFC
(2)822 address string then using

"Project Manager<www@www.cf.missouri.edu>"

should make most mail clients behave as you would like.

hth
--
Owen
 

Re:Help on mailer.

In < XXXX@XXXXX.COM >Owen Green wrote:
Quote
>I guess I need to find info about the Qsmtp.
>There must be a way to do it.

Couldn't find much on a quick google about it, other than it appears
to be a very quick and dirty public domain piece of SMTP code.
I must say, the only thing I found on it dates back to 1999.
Richard, if you find things this old which haven't been updated,
just say NO. Ignore them, otherwise you'll be wasting your
time (and maybe ours).
Quote
I would advise investigating the JavaMail API instead, which can
handle properly formatted RFC 822 addresses.

java.sun.com/products/javamail/
Here's a second to that idea. JavaMail works fine, and is
a sufficiently well-supported API from Sun.
Paul Furbacher [TeamB]
Save time, search the archives:
info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

{smallsort}

Re:Help on mailer.

Richard Li wrote:
Quote
I made a sendMessage function in JSP Bean class in order to send message and
it is successful.
The code is like this
Qsmtp mailer = new Qsmtp("smtp.exchange.missouri.edu");
mailer.setFromAddress("www@www.cf.missouri.edu");
mailer.setToAddress(" XXXX@XXXXX.COM ");
mailer.setSubject("Contract Payment.");
mailer.sendmsg();
Strong suggestion: invest a *little* time in learning the JavaMail API,
and use that. It's a de facto standard, and is extremely powerful. It
handles this sort of thing quite well (fully RFC-822-compliant from
addresses, MIME with attachments, the works..).
The Session/Transport stuff is a {*word*249}y bit too powerful, but the
defaults should work great as long as you set up the properties
correctly for the Session.