• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Any one can help me to find out problem to send SMS?

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Sir,

Please, check my following code is it correct or not? Because, I can received E-mail But I am not getting message on Mobile.

//package com.psol.xslist;

import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;

public class SendMessage
{
public static final void main(String[] args)
{
try
{
Properties props = System.getProperties();
props.put("mail.smtp.host","172.24.11.19");
Session session = Session.getDefaultInstance(props);
Message message = new MimeMessage(session);
InternetAddress from = new InternetAddress("administrator@msubaroda.ac.in");
InternetAddress to[] = InternetAddress.parse("yatin_39@hotmail.com,9825343210@west.hutch.co.in");
message.setFrom(from);
message.setRecipients(Message.RecipientType.TO,to);
message.setSubject("Server Information");
message.setSentDate(new Date());
message.setText("Server is working.");
Transport.send(message);
}
catch(MessagingException e)
{
System.err.println(e.getMessage());
}
}
}

Thanking You
Yatin
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi yatin...

have u tried sending an e-mail to :"9825343210@west.hutch.co.in"(your number i guess) and checked if u receive an sms with the same contents? check if that works first...

there may be 2 problems:
a) The service provider doesn't support such a service.
b) The format of sms may not be MIME formats.

maybe u can check this out and post it so we can think more on this one....
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this to the J2ME forum where SMS is talked about more often.

So please post your replies there. Thanks!
 
Yatin Shah
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Yes I tried No. of times but I am not getting SMS. It shows Message has been sent. By chance, If you have some other method to do. Please, let me know. I am staying in Gujarat, India. Is there any special address to send SMS? Please, let me know.

Thanking You
Yatin
[ December 10, 2004: Message edited by: Yatin Shah ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic