473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Finding SMTP mail server

107 100+
hi, i am currently sending mail through the JavaMail API. I had a problem to find out the SMTP mailserver. First i tried in airtel broadband Connection its works fine..
but now i using it in my college lab. we have broadband internet connection, but dont know what kindof connection..
Here is my Code
Expand|Select|Wrap|Line Numbers
  1. import javax.mail.*;
  2. import javax.mail.internet.*;
  3. import java.util.*;
  4.  
  5. class SendMail{
  6.   public static void main(String[] jrk)throws Exception{
  7.   String email="tomail@gmail.com";
  8.   Properties props = new Properties();
  9.   props.put("mail.smtp.host", "smtp.tn.airtelbroadband.in");
  10.  
  11.   Session s = Session.getInstance(props, null);
  12.   MimeMessage message = new MimeMessage(s);
  13.   InternetAddress from = new InternetAddress("frommail@gmail.com");
  14.   message.setFrom(from);
  15.  
  16.   InternetAddress to = new InternetAddress(email);
  17.   message.addRecipient(Message.RecipientType.TO, to);
  18.   message.setSubject("Login Information");
  19.   message.setText("Thank you for logged in..");
  20.   Transport.send(message);
  21.  }
  22. }
  23.  
How to find out the SMTP mail server..
This is a stand alone program, used in any machine..

Thanks in Advance..
Oct 29 '08 #1
1 2392
Dököll
2,364 Expert 2GB
You should probably ask your professor/instructor about the mail server name, it should work. Also, if you're not supposed to know it, you cannot connect to it.

Hope this helps direct you!

In a bit...
Nov 9 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
21
by: Nancy | last post by:
Hi, Guys, Is there any other way to use python or mod_python writing a web page? I mean, not use "form.py/email", no SMTP server. <form action="form.py/email" method="POST"> ... Thanks a lot. ...
15
by: Steven Burn | last post by:
My server has POP but only has SMTP if sending to my domain, and not other domains (such as hotmail). I'm therefore wondering, if anyone knows of any scripts etc, that will allow me to have a sort...
3
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us†page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email...
5
by: Charlie | last post by:
Hi: I'm working on an e-commerce site. Using the SMTP class, my site sends out confirmation messages. It works most of the time, but sometimes raises an error. I need a way of making sure it...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
5
by: Chris | last post by:
I am trying to send email in C#. I wrote 2 pieces of code: 1. MailMessage mail = new MailMessage(); mail.From = "from_address"; mail.To = "to_address"; mail.Subject = "subject"; mail.BodyFormat...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.