anyone knw javamail

Discussion in 'Java' started by renkie, Apr 21, 2008.

  1. renkie

    renkie Guest

    hi.
    i hav made smtp protocol n i had tried 2 send mail but when i run it
    my connection gets failed.
    can u give me the solution or hav u any project in smtp?
    or can you knw how to run such type of program except java filename...
    what will be the Mailhost for such type of program?
     
    renkie, Apr 21, 2008
    #1
    1. Advertising

  2. renkie

    Alex Kizub Guest

    On Apr 21, 7:20 pm, Lew <> wrote:
    > renkie wrote:
    > > hi.
    > > i hav made smtp protocol n i had tried 2 send mail but when i run it
    > > my connection gets failed.
    > > can u give me the solution or hav u any project in smtp?
    > > or can you knw how to run such type of program except java filename...
    > > what will be the Mailhost for such type of program?

    >
    > For Pete's sake, write in English!
    >
    > And you spelled "Java" wrong.
    >
    > --
    > Lew


    Yes. English is bad. But that's not the reason to refuse.
    Internet is full of Java Mail examples...

    import javax.mail.*;
    import javax.mail.internet.*;

    import java.util.Properties;

    class SimpleMail {
    public static void main(String[] args) throws Exception{
    System.out.println("Sending mail...");
    Properties props = new Properties();
    props.setProperty("mail.transport.protocol", "smtp");
    props.setProperty("mail.host", "smtp.mymailserver.com");
    props.setProperty("mail.user", "myuser");
    props.setProperty("mail.password", "mypwd");

    Session mailSession = Session.getDefaultInstance(props, null);
    mailSession.setDebug(true);
    Transport transport = mailSession.getTransport();

    MimeMessage message = new MimeMessage(mailSession);
    message.setSubject("HTML mail with images");
    message.setFrom(new InternetAddress(""));
    message.setContent("<h1>Hello world</h1>", "text/html");
    message.addRecipient(Message.RecipientType.TO,
    new InternetAddress(""));

    transport.connect();
    transport.sendMessage(message,
    message.getRecipients(Message.RecipientType.TO));
    transport.close();
    }
    }

    Alex.
    http://www.myjavaserver.com/~alexfromohio/
     
    Alex Kizub, Apr 22, 2008
    #2
    1. Advertising

  3. renkie

    Roedy Green Guest

    On Mon, 21 Apr 2008 07:20:30 -0700 (PDT), renkie
    <> wrote, quoted or indirectly quoted someone who
    said :

    >i hav made smtp protocol n i had tried 2 send mail but when i run it
    >my connection gets failed.
    >can u give me the solution or hav u any project in smtp?


    see http://mindprod.com/jgloss/javamail.html

    The key is turning on debug or watching the traffic with a sniffer.
    See http://mindprod.com/jgloss/sniffer.html
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Apr 22, 2008
    #3
  4. renkie

    Roedy Green Guest

    On Mon, 21 Apr 2008 20:20:15 -0400, Lew <> wrote,
    quoted or indirectly quoted someone who said :

    >For Pete's sake, write in English!


    English is clearly his second language. What you are doing is as
    pointless as people in foreign countries shouting louder at you to
    make you understand them.
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Apr 22, 2008
    #4
  5. renkie

    Roedy Green Guest

    On Mon, 21 Apr 2008 21:39:05 -0400, Lew <> wrote,
    quoted or indirectly quoted someone who said :

    >No one is refusing anything, but leetspeek is ludicrous and illiterate, as
    >well as intolerable.


    I recall a MASH episode with a young man who picked up his English
    from soldiers. It was quite cheeky. I suspect the guy you are
    blasting has picked up much of his English from reading newsgroups. He
    is just repeating what he has seen. His use of netspeak does not
    deserve the same degree of slap than use by a native speaker does.

    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Apr 22, 2008
    #5
  6. Lew wrote:
    > Roedy Green wrote:
    >> On Mon, 21 Apr 2008 20:20:15 -0400, Lew <> wrote,
    >> quoted or indirectly quoted someone who said :
    >>
    >>> For Pete's sake, write in English!

    >>
    >> English is clearly his second language. What you are doing is as
    >> pointless as people in foreign countries shouting louder at you to
    >> make you understand them.

    >
    > "Clearly"? It is not clear at all to me; the leetspeek is just like
    > what many American youths do. I do not conclude that the OP is not a
    > native English speaker absent any evidence of that.
    >
    > What you are doing is as pointless as supporting the obnoxious use of an
    > illiterate idiom.


    The posters IP address points to Australia ...

    In general I find it ridiculous to comment on small grammatical
    errors or spell it "java" or use an abbreviation as thx. Everybody
    can read that. And it is pointless to correct it.

    But in this particular case the original post was unreadable.

    Arne
     
    Arne Vajhøj, Apr 23, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JDS

    Anyone?? Anyone at all??

    JDS, Sep 26, 2005, in forum: HTML
    Replies:
    2
    Views:
    420
    Montgomery BOO...URNS
    Sep 29, 2005
  2. millan4u1
    Replies:
    0
    Views:
    910
    millan4u1
    Mar 23, 2011
  3. millan4u1

    aNY BODY KNW TO DO THIS XSL ??

    millan4u1, Mar 23, 2011, in forum: XML
    Replies:
    0
    Views:
    1,032
    millan4u1
    Mar 23, 2011
  4. Zero Piraeus
    Replies:
    0
    Views:
    218
    Zero Piraeus
    Oct 21, 2012
  5. Jussi Piitulainen
    Replies:
    0
    Views:
    275
    Jussi Piitulainen
    Oct 21, 2012
Loading...

Share This Page