Internet Access by Area Code
Internet Service by City/State
 FAQFAQ   SearchSearch     RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  ISP Guide    

project of sending bulk email



 
Top Rated Dialup Internet Service Providers & Top Rate DSL Provider
Post new topic   Reply to topic  
   ISP Guide -> ISP Guide Forum Index -> Technical Questions & Answers
Get Instant quotes for
Home: DSL Cable Satellite
Business: DSL T1 VoIP

Latest Discussions 
   buy zoloft online
   Need help
   Problem with activation - help me
   Error while booting
   kernel Neighbour table overflow Redhat L ...
Popular Discussions 
  POP3 & SMTP SERVER ADDRESS of WEBSIT ...
  w32.spybot.worm–w32.spybot.worm removal ...
  wdfmgr.exe showed up in my task manager, ...
  Virtual Memory Minimum Too Low Problem
  Repair IE 6 - trouble with internet Expl ...
Hottest Discussions 
   C:\WINDOWS\System32\Autoexec.nt error
   POP3 & SMTP SERVER ADDRESS of WEBSIT ...
   Outlook Express Problems
   w32.spybot.worm–w32.spybot.worm removal ...
   wdfmgr.exe showed up in my task manager, ...
Other Topics
I am getting error 678 what does that mean?
invalid username/password
i cant connect
USB or Cat 5
DUN Error 720. help please
error 691
I am getting error 629? What do I do?
email issues
ISP PROBLEM !!
Network Connection Problem
Other Forums
Hardware/ Networking and All Operating Systems (Windows 98/XP/MAC/Linux)
Internet Utilities & Software
Tips & Tricks
Author
Message
pradeepsingh999



Joined: 28 Aug 2008
Posts: 1

Offline

PostPosted: Fri Aug 29, 2008 8:33 am    Post subject: project of sending bulk email Reply with quote

Hi
I have assigned to make a java project of sending bulk email through my web-application.Could you tell me how can i achieve this one.
I am using MTNL internet broadband connection.

I know Java but dont know how to proceed.
Please help me

pradeep singh
pradeepsingh999@yahoo.co.in
 
henry



Joined: 30 Jun 2004
Posts: 156

Offline

PostPosted: Mon Nov 03, 2008 4:07 pm    Post subject: Java script for javamail.api Reply with quote

Hi Pradeep,


This is the javamail.api for mail script.

import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class sms
{
public static void main(String args[])
{
try
{
String strstrsmtserver="smtp.bol.net.in";
String strto="pradeepsingh999@yahoo.co.in";
String strfrom="sandeepsumal@bol.net.in";
String strsubject="Hello";
String bodytext="This is my first java mail program";
sms s=new sms();
s.send(strstrsmtserver,strto,strfrom,strsubject,bodytext);
}
catch(Exception e)
{
System.out.println("usage:java sms"+"strstrsmtpserver tosddress fromaddress subjecttext bodyText");
}
System.exit(0);
}
public void send(String strsmtpserver,String strto,String strfrom ,String strsubject,String bodytext)
{
try
{
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
Properties p=new Properties(System.getProperties());
if(strsmtpserver!=null)
{
p.put("mail.transport.protocol","smtp");
p.put("mail.smtp.host","pradeepsingh999@yahoo.co.in");
p.put("mail.smtp.port","25");
}
Session session=Session.getDefaultInstance(p);
Message msg=new MimeMessage(session);
Transport trans = session.getTransport("smtp");
trans.connect("smtp.bol.net.in","sandeepsumal@bol.net.in","1234563757");
msg.setFrom(new InternetAddress(strfrom));
msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(strto,false));
msg.setSubject(strsubject);
msg.setText(bodytext);
msg.setHeader("X-Mailer","mtnlmail");
msg.setSentDate(new Date());
Transport.send(msg);
System.out.println("Message sent OK.");
}
catch(Exception ex)
{
System.out.println("here is error");
ex.printStackTrace();
}
}
}
 
Display posts from previous:   
Post new topic   Reply to topic     ISP Guide -> ISP Guide Forum Index -> Technical Questions & Answers All times are GMT - 6 Hours
Email this topic to a friend

Page 1 of 1
ISP Disscussion Topics

Main Forum Category
 
Other Network Forums
 •  ISP Discussions & Reviews
 •  ISP Technical Support
Broadband ISP Discussion
Forum Announcements and Site Reviews
 
 
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Cable connection queries 66 jenipher 14751 Thu Jul 21, 2005 5:31 am
justin
No new posts Help 1 Playerstatus143 1501 Fri Jun 18, 2004 4:59 am
Sandy
No new posts Mac Modem Help 1 robinson 1738 Thu Jun 17, 2004 6:08 pm
bob
No new posts modem help 0 domino 2749 Wed Jun 09, 2004 11:42 am
domino
No new posts HELP Me Please 4 Guest 2238 Sun Jun 06, 2004 6:45 am
sandeep sapru
 


Subscriber Now!
...with web-based news readers. Click your choice below
             




Premium Network Of Directories
Affiliate Resources
Free Web Directory
Call to India
Domain-Name Registration
Web Hosting Provider
ISP Providers
Free Downloads
Broadband Internet
Outsourcing company Directory
Data Recovery Guide
Affiliate Resources
Call to Mexico
 
Other Internet Resources: ISP Resources