Article View: aus.computers.java
Article #558Re: Sending email from Java applet
From: Alan Boldock
Date: Fri, 25 Aug 2000 00:00
Date: Fri, 25 Aug 2000 00:00
48 lines
1879 bytes
1879 bytes
import sun.net.smtp.*;
Do something like this:
String TO = "someone@someewhere.com.au"
String FROM = "someoneelse@someewhere.com.au"
try {
SmtpClient smtp = new SmtpClient("127.0.0.1");// your maill server
smtp.from(FROM);
smtp.to(TO);
PrintStream msg = smtp.startMessage();
msg.print("From: Me\n");
msg.print("Subject:A request for quote via AuseFind\n");
msg.print("To: You\n");
msg.println("");
msg.println("");
msg.println("Dear User");
msg.println("");
msg.println("Hello");
smtp.closeServer();
System.out.println("Success email sent to: " + TO);
} catch // blah blah
Alan Boldock
alan@boldenterprise.com.au
"WENDY GREEN" <wgreen@vtown.com.au> wrote in message
news:39a5b8b1@news.iprimus.com.au...
> Hi. Does anyone have some code for an applet which collects informations
and
> sends it as an email?
>
> I would be most grateful for any assistance. Please keep it simple, I'm a
> newbie.
>
> If emailing a response please email to hermit_au@yahoo.com.
>
> Thanx,
>
> Hermit.
>
>
>
>
Technical Details
Message-ID:
<5Qjp5.798$cr3.27542@ozemail.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39a5b8b1@news.iprimus.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,12d0920a8cdba2d4 X-Google-Attributes: gid10d6db,public From: "Alan Boldock" <aboldock@boldenterprise.com.au> Subject: Re: Sending email from Java applet Date: 2000/08/25 Message-ID: <5Qjp5.798$cr3.27542@ozemail.com.au> X-Deja-AN: 662180455 Distribution: world References: <39a5b8b1@news.iprimus.com.au> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Trace: ozemail.com.au 967166337 203.38.173.82 (Fri, 25 Aug 2000 11:18:57 EST) Organization: www.boldenterprise.com.au X-MSMail-Priority: Normal Reply-To: "Alan Boldock" <aboldock@boldenterprise.com.au> NNTP-Posting-Date: Fri, 25 Aug 2000 11:18:57 EST Newsgroups: aus.computers.java