Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Standard method of sending email 1

Status
Not open for further replies.

Tokhra

Programmer
Oct 1, 2003
134
0
0
ES
Hi all,

Im looking for the standard method of sending a html based email in a JSP page.

Any emails or links for this? I searched google but im not sure what methods are the "standard" way to do it, without including lots of extra libraries.

Thanks,
Matt.
 
Do you use JRun? Have you tried the jrun:sendmail tags?

Code:
<jrun:sendmail host="whateverhost.somedomain.com_or_gov_or_net_or_org" sender="whoever" recipient="<%=addressees%>" subject="<%=subject%>">Message here.
</jrun:sendmail>

--Dave
 
Hi Dave, thanks for the response, no I don't use JRun unfortunately, im using Tomcat.

I found this:


but im a bit confused on the following line:

// Setup mail server
props.put("mail.smtp.host", host);

the first param would be: smtp.myserver.com and what is host? the port? its just a string in the above link
 
I do not recommend using sendmail. Its not truly crossplatform and can break in migrations ,even from UNIX to UNIX. This to me defeats a major bonus of doing your development in Java.

I recommend using Sun's JavaMail interface. Its truly cross-platform and interfaces directly at the SMTP level, giving fine control over error conditions and authentication.

 
Thanks for the response siberian, luckily enough im going that route but having a few problems, see my last post :)
 
Oh,

// Setup mail server
props.put("mail.smtp.host", host);

Host would be smtp.myserver.com and the first param is the name of the property, am I right?

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top