🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
6 messages
6 total messages Started by Richard Li Mon, 03 Nov 2003 19:50
Help on mailer.
#398
Author: Richard Li
Date: Mon, 03 Nov 2003 19:50
19 lines
1501 bytes
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("lix@missouri.edu");
            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.
#399
Author: Owen Green
Date: Mon, 03 Nov 2003 20:18
20 lines
1406 bytes
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.
#401
Author: Richard Li
Date: Tue, 04 Nov 2003 20:54
32 lines
1851 bytes
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" <o.t.green@ntlworld.com> wrote in message
news:18zb3l0xcdxiu.10oynx61olq1e$.dlg@40tude.net...
> 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.
#403
Author: Paul Furbacher TeamB
Date: Tue, 04 Nov 2003 21:30
33 lines
2226 bytes
In <ide38cskub4s.9b073yi2npzu.dlg@40tude.net> Owen Green  wrote:

> > 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).

>  I would advise investigating the JavaMail API instead, which can 
>  handle properly formatted RFC 822 addresses. 
> 
>  http://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:
       http://info.borland.com/newsgroups/ngsearch.html
       
  Is it in Joi Ellis's Faq-O-Matic? 
       http://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.
Re: Help on mailer.
#402
Author: Owen Green
Date: Tue, 04 Nov 2003 21:41
18 lines
1407 bytes
On Tue, 4 Nov 2003 14:54:47 -0600, Richard Li wrote:

> 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.

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 would advise investigating the JavaMail API instead, which can handle
properly formatted RFC 822 addresses. 

http://java.sun.com/products/javamail/

hth
--
Owen
Re: Help on mailer.
#404
Author: Shankar Unni
Date: Wed, 05 Nov 2003 17:50
19 lines
1928 bytes
Richard Li wrote:

> 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("lix@missouri.edu");
>             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 teeny bit too powerful, but the
defaults should work great as long as you set up the properties
correctly for the Session.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads