dcsimg
how do i run linux /usr/sbin/sendmail using a java program (either JSP or servlet)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   venusunil_boyireddy
Posted On:   Wednesday, September 11, 2002 01:29 AM

ours is a java based tool is working on Linux 6.2. as a part of the application we need to send mails to users selected from the databse. i tried to do this using /usr/sbin/sendmail option. how do i do that. i invoked the sendmail command from the command prompt, i got the solution. mail was sent to the specified addresses. but for this i used redirectional operators syntax is as follows sendmail toaddress < filename. in the file i used To:, From:, Subject: so that it sends mail to all people whos names are given with To: but when i tried it with java programs (both Runtime.exec(String) and Runtime.exec(String[]) its not sending and throwing an error saying that <   More>>

ours is a java based tool is working on Linux 6.2. as a part of the application we need to send mails to users selected from the databse. i tried to do this
using /usr/sbin/sendmail option.

how do i do that.

i invoked the sendmail command from the command prompt, i got the solution. mail was sent to the specified addresses. but for this i used redirectional operators
syntax is as follows

sendmail toaddress < filename. in the file i used To:, From:, Subject: so that it sends mail to all people whos names are given with To:
but when i tried it with java programs (both Runtime.exec(String) and Runtime.exec(String[]) its not sending and throwing an error saying that < and file name are not valid addresses.

any help would be greatful...

thanx and regards

venu sunil

   <<Less
About | Sitemap | Contact