Hi vikas,
You can run this demo Application directly like simle Java Program.
But you need to download "http-email-
files section.
You set classpath to that jar file, Then you run this demo.
Ok
Regards,
Thirupathi.
--- In completeJava@
<vikas_impetustech@
>
> how can i run this code. I alrdy download that file from the group.but
> where i hv 2 place that file.
> I 'm facing problem while compiling this code. SimpleEmil is not
> found..and i start imported packg is also not found.
>
>
> --- In completeJava@
> <thirupathi_
> >
> >
> >
> >
> > import org.apache.commons.
> >
> > public class EmailDemo
> > {
> > public static void main(String[
> > {
> > sendSimpleEmail(
> > }
> > public static void sendSimpleEmail(
> > SimpleEmail email = new SimpleEmail(
> > email.setHostName(
> > email.addTo(
> > <mailto:thirupathi@
> > email.setFrom(
> > <mailto:thirupathi@
> > email.setSubject(
> > email.setMsg(
> > email.send()
> > }
> >
> > public static void sendEmailWithAttach
> > EmailAttachment attachment = new EmailAttachment(
> > attachment.setPath(
> > attachment.setDispo
> > attachment.setDescr
> > attachment.setName(
> >
> > // Create the email message
> > MultiPartEmail email = new MultiPartEmail(
> > email.setHostName(
> > email.addTo(
> > "Thirupathi"
> > email.setFrom(
> > <mailto:thirupathi@
> > email.setSubject(
> > email.setMsg(
> >
> > // add the attachment
> > email.attach(
> >
> > // send the email
> > email.send()
> > }
> > }
> >
> >
> >
> > for required jar files download http-email-commons.
> > Section of completeJava Group
> >
>
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
No comments:
Post a Comment