Problem in sending mail using Jsp(Jdeveloper9i)

My Code is working when i m sending mail through commandpromt
c:/Jdeveloper/Jdk/bin
But when I m trying it thjrough jsp page than it gives compilation error that not found
Javax.mail.* and Javax.mail.internet.*
I have tried to add mail.jar and activation.jar in c:/Jdeveloper/jdev/jre/lib/ext
If it is wrong place to add these files than plz suggest what i have to do.
Thanks in Advance

This is just a relay error. This means that the outbound SMTP server you are using doesn't allow relaying.
Relaying is where the sender is not part of the domain the SMTP server manages. The no-relay concept is pretty common now as spammers often use SMTP servers which allow relaying to send their spam.
The solution is to allow relaying on the SMTP server for your IP address. Another solution which some SMTP servers will implement is to allow relaying for clients who successfully authenticate regardless of their IP address. This is sometimes a better solution because it means you don't have to change anything if your client code moves to a different server.
In your error message:
class javax.mail.SendFailedException: 551 User not local. We don't relay
You can see the SMTP Error Code (551). Look at the SMTP specification (rfc 821 I think) to see what all the error codes mean in case you get another one

Similar Messages

  • How to send mail using jsp program

    am very new to jsp and doing my final year project. i need to send mails using my jsp program.can anyone say wht to do that is wht to include to send mails using jsp program. n also a sample code to send mail using jsp program.
    Thanx in advance

    Use below script.
    <%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
    <%
    Properties props = new Properties();
    props.put("mail.smtp.host", "mailserver.com");
    Session s = Session.getInstance(props,null);
    InternetAddress from = new InternetAddress("[email protected]");
    InternetAddress to = new InternetAddress([email protected]");
    MimeMessage message = new MimeMessage(s);
    message.setFrom(from);
    message.addRecipient(Message.RecipientType.TO, to);
    message.setSubject("Your subject");
    message.setText("Your text");
    Transport.send(message);
    %>{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problems to SEND MAIL using WWV_FLOW_MAIL.SEND - APEX_MAIL

    I tried send mail using the code below
    DECLARE
    l_body      CLOB:= EMPTY_CLOB;
    l_body_html CLOB:= EMPTY_CLOB;
    BEGIN
    wwv_flow_api.set_security_group_id;
    l_body :='<html>
    +<head>+
    +<style type="text/css">+
    +body{font-family: Arial, Helvetica, sans-serif;+
                                   +font-size:10pt;+
                                   +margin:30px;+
                                   +background-color:#ffffff;}+
    +span.sig{font-style:italic;+
    font-weight:bold;
    color:#811919;}
    +</style>+
    +</head>+
    +<body>+
    +</html>';+
    l_body_html := '<html>
    +<head>+
    +<style type="text/css">+
    +body{font-family: Arial, Helvetica, sans-serif;+
                                   +font-size:10pt;+
                                   +margin:30px;+
                                   +background-color:#ffffff;}+
    +span.sig{font-style:italic;+
    font-weight:bold;
    color:#811919;}
    +</style>+
    +</head>+
    +<body>+
    +</html>';+
    wwv_flow_mail.send('[email protected]','[email protected]',nvl(l_body,'Texto com erro'),nvl(l_body_html,'erro2'),'K','[email protected]',
    +'[email protected]','[email protected]');+
    wwv_flow_mail.push_queue;
    END;
    +/+
    This code return the message:
    Mail To From Subject CC BCC Created On Created By Error Created
    CHECK$01 [email protected] [email protected] K [email protected] [email protected] 08/23/2010 03:05:00 PM SYS
    ORA-06502: PL/SQL: erro: erro de conversão de caractere em número numérico ou de valor
    Follow my mail settings
    SMTP Host Address : POP.SLE.TERRA.COM.BR
    SMTP Host Port 110
    Administration Email Address [email protected]
    Notification Email Address [email protected]
    what´s wrong ?

    I would try sending just basic text first, then move on to getting your other pieces dynamics. The very last step to me would be the email body.
    Here is an example of a basic text email I use:
    declare
      e_id        NUMBER;
      c_id        NUMBER;
      emp_nm      VARCHAR2(100);
      clrk_id     NUMBER;
      e_clrk      VARCHAR2(47);
      e_org       NUMBER;
      e_sender    VARCHAR2(50);
      e_recip_lst VARCHAR2(255); 
      e_cc        VARCHAR2(100);
      e_bcc       VARCHAR2(100);
      e_subj      VARCHAR2(50);
      e_msg_ln1   VARCHAR2(100);
      e_msg_ln2   VARCHAR2(100);
      e_msg_ln3   VARCHAR2(100);
      e_msg_ln4   VARCHAR2(100);
      e_msg_ln5   VARCHAR2(100);
      e_msg       VARCHAR2(1000);
      CRLF        CHAR(2) := CHR(13) || CHR(11);
      tmp_flag    NUMBER;
    begin
       if :P2_INJURY_FLAG = 1 then
       -- find out if it has changed first so we don't keep sending emails
        select injury_flag, VEH_LOC
          into tmp_flag, e_org
          from APPS.tc
         where tc_id = :P2_TC_ID;
       if :P2_injury_flag <> tmp_flag then
        begin
           select FN_GET_USER(nvl(v('APP_USER'),user))
             into clrk_id 
             from dual;
          select ADMIN_USERNAME
             into e_clrk
            from APPS.APEX_ACCESS_CONTROL
           where ID = clrk_id;
        exception
           when others then null; -- in case we cannot find the user
        end;
        e_id          :=  :P2_EMP_ID;
        c_id          :=  :P2_TC_ID;
        select EMP_FNAME ||' '|| EMP_MNAME ||' '|| EMP_LNAME into emp_nm
          from APPS.EMPLOYEES
         where EMP_ID = e_id;  --
        select RECIPIENTS, CC, BCC
          into e_recip_lst, e_cc, e_bcc
          from APPS.SAFETY_NOTIFICATIONS
         where ORG_ID = e_org;  --
          e_sender    :=  '[email protected]';
          e_subj      :=  'Loss Reported';
          e_msg_ln1   :=  'Employee: ' || emp_nm || ' (' || e_id || ')'  
                          || CRLF;
          e_msg_ln2   :=  'Was reported as sustaining a loss' || CRLF;
          e_msg_ln3   :=  'by ' || e_clrk ||CRLF;
          e_msg_ln4   :=  CRLF;
          e_msg_ln5   :=  'Sent ' || to_char(sysdate,'MONTH DD,YYYY HH:MI AM');
          e_msg       :=  e_msg_ln1 || e_msg_ln2 || e_msg_ln3 || e_msg_ln4 || e_msg_ln5 || CRLF || e_recip_lst;
         utl_mail.send(
           sender => e_sender,
           recipients => e_recip_lst,
           cc => e_cc,
           bcc => e_bcc,
           subject => e_subj,
           message => e_msg);
      end if;
    end if;
    end;

  • Problem in sending mail using java mail api

    This is the pogram I am using as of now to send a mail to yahoo id.
    import javax.mail.*;
    import javax.mail.internet.*;
    public class SendingMail2
    public SendingMail2()
    try
    String from = "ravikiran_sunrays";
    String to = "[email protected]";
    String subject = "the subject u wanna send ";
    String cc="[email protected]";
    String bcc="[email protected]";
    String text="the matter that u wanna send ";
    java.util.Properties prop = System.getProperties();
    prop.put("mail.smtp.host","mail.yahoo.com");
    //prop.put("http.proxyHost",System.getProperty("http.proxyHost"));
    //prop.put("http.proxyPort","8080");
    //prop.put("http.proxyPort",System.getProperty("http.proxyPort"));
    //prop.put("http.proxyHost","172.19.48.201");
    //System.getProperties().setProperty("http.proxyPort","8080");
    //System.getProperties().setProperty("http.proxyHost","172.19.48.201");
    Session ses = Session.getInstance(prop,null);
    MimeMessage message = new MimeMessage(ses);
    try
    Address fromAddress = new InternetAddress(from);
    message.setFrom(fromAddress);
    message.setSubject(subject);
    Address[] toAddress = InternetAddress.parse(to);
    Address[] cc_address=InternetAddress.parse(cc);
    Address[] bcc_address=InternetAddress.parse(bcc);
    message.setRecipients(Message.RecipientType.TO,toAddress);
    message.setRecipients(Message.RecipientType.CC,cc_address);
    message.setRecipients(Message.RecipientType.BCC,bcc_address);
    message.setSentDate(new java.util.Date());
    message.setText(text);
    Transport.send(message);
    System.out.println("Mail Successfully Sent");
    catch(Exception e)
    System.out.println("Problem " + e);
    catch(Exception e)
    System.out.println("Problem " + e);
    public static void main(String[] args)
    SendingMail2 sendingMail2 = new SendingMail2();
    This is the exception I am getting when I try 2 execute that program.
    avax.mail.SendFailedException: Sending failed;
    nested exception is:
         javax.mail.MessagingException: Unknown SMTP host: mail.yahoo.com;
    nested exception is:
         java.net.UnknownHostException: mail.yahoo.com

    listen buddy
    this is a class i made it is easy to understand it sends mails and check inbox just adduser from telnet with remote manager in james create the three accounts i am using and then use this class and its methods
    also the next class that contains the mails test my class and what i am saying
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class MailClient
    extends Authenticator
    public static final int SHOW_MESSAGES = 1;
    public static final int CLEAR_MESSAGES = 2;
    public static final int SHOW_AND_CLEAR =
    SHOW_MESSAGES + CLEAR_MESSAGES;
    protected String from;
    protected Session session;
    protected PasswordAuthentication authentication;
    public MailClient(String user, String host)
    this(user, host, false);
    public MailClient(String user, String host, boolean debug)
    from = user + '@' + host;
    authentication = new PasswordAuthentication(user, user);
    Properties props = new Properties();
    props.put("mail.user", user);
    props.put("mail.host", host);
    props.put("mail.debug", debug ? "true" : "false");
    props.put("mail.store.protocol", "pop3");
    props.put("mail.transport.protocol", "smtp");
    session = Session.getInstance(props, this);
    public PasswordAuthentication getPasswordAuthentication()
    return authentication;
    public void sendMessage(
    String to, String subject, String content)
    throws MessagingException
    System.out.println("SENDING message from " + from + " to " + to);
    System.out.println();
    MimeMessage msg = new MimeMessage(session);
    msg.addRecipients(Message.RecipientType.TO, to);
    msg.setSubject(subject);
    msg.setText(content);
    Transport.send(msg);
    public void checkInbox(int mode)
    throws MessagingException, IOException
    if (mode == 0) return;
    boolean show = (mode & SHOW_MESSAGES) > 0;
    boolean clear = (mode & CLEAR_MESSAGES) > 0;
    String action =
    (show ? "Show" : "") +
    (show && clear ? " and " : "") +
    (clear ? "Clear" : "");
    System.out.println(action + " INBOX for " + from);
    Store store = session.getStore();
    store.connect();
    Folder root = store.getDefaultFolder();
    Folder inbox = root.getFolder("inbox");
    inbox.open(Folder.READ_WRITE);
    Message[] msgs = inbox.getMessages();
    if (msgs.length == 0 && show)
    System.out.println("No messages in inbox");
    for (int i = 0; i < msgs.length; i++)
    MimeMessage msg = (MimeMessage)msgs;
    if (show)
    System.out.println(" From: " + msg.getFrom()[0]);
    System.out.println(" Subject: " + msg.getSubject());
    System.out.println(" Content: " + msg.getContent());
    if (clear)
    msg.setFlag(Flags.Flag.DELETED, true);
    inbox.close(true);
    store.close();
    System.out.println();
    ====================================
    testing this class
    =======================================
    public class JamesConfigTest
    public static void main(String[] args)
    throws Exception
    // CREATE CLIENT INSTANCES
    MailClient redClient = new MailClient("red", "localhost");
    MailClient greenClient = new MailClient("green", "localhost");
    MailClient blueClient = new MailClient("blue", "localhost");
    // CLEAR EVERYBODY'S INBOX
    redClient.checkInbox(MailClient.CLEAR_MESSAGES);
    greenClient.checkInbox(MailClient.CLEAR_MESSAGES);
    blueClient.checkInbox(MailClient.CLEAR_MESSAGES);
    Thread.sleep(500); // Let the server catch up
    // SEND A COUPLE OF MESSAGES TO BLUE (FROM RED AND GREEN)
    redClient.sendMessage(
    "blue@localhost",
    "Testing blue from red",
    "This is a test message");
    greenClient.sendMessage(
    "blue@localhost",
    "Testing blue from green",
    "This is a test message");
    Thread.sleep(500); // Let the server catch up
    // LIST MESSAGES FOR BLUE (EXPECT MESSAGES FROM RED AND GREEN)
    blueClient.checkInbox(MailClient.SHOW_AND_CLEAR);
    =======================================================
    it suppose to print this
    Clear INBOX for red@localhost
    Clear INBOX for green@localhost
    Clear INBOX for blue@localhost
    SENDING message from red@localhost to blue@localhost
    SENDING message from green@localhost to blue@localhost
    Show and Clear INBOX for blue@localhost
    From: green@localhost
    Subject: Testing blue from green
    Content: This is a test message
    From: red@localhost
    Subject: Testing blue from red
    Content: This is a test message
    thanks a lot
    but i need ur help plzzzzzzzzzzzz
    i can create account from telnet
    but how i can create a new account from java .. a jsp page that i made to create a new account on the server
    plzzzzzzzz help me
    bye

  • Java Session problem while sending mail(using javamail) using Pl/SQL

    Hello ...
    i am using Java stored procedure to send mail. but i'm getting java session problem. means only once i can execute that procedure
    pls any help.

    props.put("smtp.gmail.com",host);I doubt javamail recognizes the 'smtp.gmail.com' property. I think it expects 'mail.host'. Of course since it cannot find a specified howt it assumes by default localhost
    Please format your code when you post the next time, there is a nice 'code' button above the post area.
    Mike

  • Problems in Sending mails using java mail

    hi all,
    heres my piece of code-
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    public class SendEmail
         public static void main(String[] args)
    System.out.println(args.length);
              if (args.length != 6)
                   System.out.println("usage: sendmessage <to> <from> <smtphost> <true|false> <subject> <text>");
                   System.exit(1);System.out.println("jj"+args.length);
         SendEmail m=new SendEmail();
         m.SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]);
    public static String SendMessage(String emailto, String emailfrom, String smtphost, String emailmultipart, String msgSubject, String msgText)
         boolean debug = false; // change to get more information
    String msgText2 = "multipart message";
    boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue();
    // set the host
    Properties props = new Properties();
    props.put("mail.smtp.host",smtphost);
         props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.sendpartial", "true");
    Authenticator loAuthenticator = new SMTPAuthenticator();
    System.out.println("f");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, loAuthenticator );
    session.setDebug(debug);
    System.out.println("ff");
    //System.out.println( loAuthenticator);
    try
    // create a message
    Message msg = new MimeMessage(session);
    // set the from
    InternetAddress from = new InternetAddress(emailfrom);
    msg.setFrom(from);
    InternetAddress[] address =
    new InternetAddress(emailto)
    //InternetAddress ad=new InternetAddress(session);
    //System.out.println(ad.getLocalAddress());
    msg.setRecipients(Message.RecipientType.TO, address);
    msg.setSubject(msgSubject);
    if(!sendmultipart)
    // send a plain text message
    msg.setContent(msgText, "text/plain");
    else
    // send a multipart message// create and fill the first message part
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setContent(msgText, "text/plain");
    // create and fill the second message part
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setContent(msgText2, "text/plain");
    // create the Multipart and its parts to it
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    // add the Multipart to the message
    msg.setContent(mp);
    Transport transport = session.getTransport("smtp");
         transport.connect(smtphost,"[email protected]","xyz");
    msg.saveChanges();
              //transport.sendMessage(msg,msg.getAllRecipients());
    transport.sendMessage(msg,msg.getAllRecipients());
    transport.close();     
    catch(MessagingException mex)
    mex.printStackTrace();
    return "Email sent to " + emailto;
    class SMTPAuthenticator extends Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    String username = "[email protected]";
    String password = "xyz";
    return new PasswordAuthentication(username, password);
    i get the following errors-
    SmtpSendFailedException:550 Invalid Recipient
    Sometimes the mail gets send but sometimes it doesnt (while sending it to yahoo)..
    i guess there is some firewall problem..
    can somebody help me please.
    thanks

    Hello. I don't know if this will help you much but just reading the posts there might be something wrong with the information that is being sent to your SMTP host. You might make sure that the string that you are sending doesn't have extra characters attached to it or that a timeout is not occuring during the transfer of your username/password information. Sometimes the '@' gets translated into something else.
    A 550 error usually indicates that the mail server didn't recived a valid user on the system, this came into play I believe when people start abusing SMTP to SPAM a server using everything under the sun...so filters were put in place i.e. If you are not a Qualified Domain Name registered mailserver and someone has a filter in place your message will go kersplat because forwarding is no longer being allowed. Yopu might try a diffrent tactic.
    1. you might trim your strings.
    2. build strings in a connect method so that its a bit less amateur code.
    public void connect() {
            // Display connect dialog.
            ConnectDialog dialog = new ConnectDialog(this);
            dialog.show();
            // Build connection URL from connect dialog settings.
            StringBuffer connectionUrl = new StringBuffer();
            connectionUrl.append(dialog.getType() + "://");
            connectionUrl.append(dialog.getUsername() + ":");
            connectionUrl.append(dialog.getPassword() + "@");
            connectionUrl.append(dialog.getServer() + "/");3. Make absolutely certain that the SMTP server you are sending from is registered and qualified in your code. Meaning you can't use a bogus MTA(mail trasport agent) or you get bounced.
       private void sendMessage(int type, Message message) {
            // Display message dialog to get message values.
            MessageDialog dialog;
            try {
                dialog = new MessageDialog(this, type, message);
                if (!dialog.display()) {
                    // Return if dialog was cancelled.
                    return;
            } catch (Exception e) {
                showError("Unable to send message.", false);
                return;
            try {
                // Create a new message with values from dialog.
                Message newMessage = new MimeMessage(session);
                newMessage.setFrom(new InternetAddress(dialog.getFrom()));
                newMessage.setRecipient(Message.RecipientType.TO,
                        new InternetAddress(dialog.getTo()));
                newMessage.setSubject(dialog.getSubject());
                newMessage.setSentDate(new Date());
                newMessage.setText(dialog.getContent());
                // Send new message.
                Transport.send(newMessage);
            } catch (Exception e) {
                showError("Unable to send message.", false);
        }Lastly, if you are writing a SPAM client, you should go to your dos prompt and type format c: (j/k)
    now the disclaimer. The code published is not mine it was a piece of an example that I got from a brillient book by Herbert Schildt and James Holmes who I would love to be able to chat with since the work they do is absolutely perfect. You might check it out from your Local Library the ISBN is 0-07-222971-3 they have a whole section just on JavaMail.
    Well hope that gets you started in the right direction, I would read the ISO standards published for SMTP, you might get a better grip on the error codes that are bound to come up.

  • Problems while sending mail using java mail

    hi all,
    the following are the errors i get while sending a mail from my smtp local host-
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    public class SendEmail
         public static void main(String[] args)
    System.out.println(args.length);
              if (args.length != 6)
                   System.out.println("usage: sendmessage <to> <from> <smtphost> <true|false> <subject> <text>");
                   System.exit(1);System.out.println("jj"+args.length);
         SendEmail m=new SendEmail();
         m.SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]);
    public static String SendMessage(String emailto, String emailfrom, String smtphost, String emailmultipart, String msgSubject, String msgText)
    boolean debug = false; // change to get more information
    String msgText2 = "multipart message";
    boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue();
    // set the host
    Properties props = new Properties();
    props.put("mail.smtp.host",smtphost);
         props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.sendpartial", "true");
    Authenticator loAuthenticator = new SMTPAuthenticator();
    System.out.println("f");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, loAuthenticator );
    session.setDebug(debug);
    try
    // create a message
    Message msg = new MimeMessage(session);
    // set the from
    InternetAddress from = new InternetAddress(emailfrom);
    msg.setFrom(from);
    InternetAddress[] address =
    new InternetAddress(emailto)
    //InternetAddress ad=new InternetAddress(session);
    msg.setRecipients(Message.RecipientType.TO, address);
    System.out.println("fc");
    msg.setSubject(msgSubject);
    System.out.println("fvf");
    if(!sendmultipart)
    // send a plain text message
    msg.setContent(msgText, "text/plain");
    System.out.println("fif");
    else
    System.out.println("felsd");
    // send a multipart message// create and fill the first message part
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setContent(msgText, "text/plain");
    // create and fill the second message part
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setContent(msgText2, "text/plain");
    // create the Multipart and its parts to it
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    // add the Multipart to the message
    msg.setContent(mp);
    Transport transport = session.getTransport("smtp");
         transport.connect(smtphost,"[email protected]","xyz");
    msg.saveChanges();
    System.out.println("fconn");
              //transport.sendMessage(msg,msg.getAllRecipients());
    transport.sendMessage(msg,msg.getAllRecipients());
    transport.close();     
    //Transport.send(msg);
    catch(MessagingException mex)
    mex.printStackTrace();
    return "Email sent to " + emailto;
    class SMTPAuthenticator extends Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    String username = "[email protected]";
    String password = "xyz";
    return new PasswordAuthentication(username, password);
    i dont understand what the problem is..inspite of having the right code..
    i guess some firewall problem..
    can somebody help me please..il be highly obliged..thanks..

    hi all,
    the following are the errors i get while sending a mail from my smtp local host-
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    public class SendEmail
         public static void main(String[] args)
    System.out.println(args.length);
              if (args.length != 6)
                   System.out.println("usage: sendmessage <to> <from> <smtphost> <true|false> <subject> <text>");
                   System.exit(1);System.out.println("jj"+args.length);
         SendEmail m=new SendEmail();
         m.SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]);
    public static String SendMessage(String emailto, String emailfrom, String smtphost, String emailmultipart, String msgSubject, String msgText)
    boolean debug = false; // change to get more information
    String msgText2 = "multipart message";
    boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue();
    // set the host
    Properties props = new Properties();
    props.put("mail.smtp.host",smtphost);
         props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.sendpartial", "true");
    Authenticator loAuthenticator = new SMTPAuthenticator();
    System.out.println("f");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, loAuthenticator );
    session.setDebug(debug);
    try
    // create a message
    Message msg = new MimeMessage(session);
    // set the from
    InternetAddress from = new InternetAddress(emailfrom);
    msg.setFrom(from);
    InternetAddress[] address =
    new InternetAddress(emailto)
    //InternetAddress ad=new InternetAddress(session);
    msg.setRecipients(Message.RecipientType.TO, address);
    System.out.println("fc");
    msg.setSubject(msgSubject);
    System.out.println("fvf");
    if(!sendmultipart)
    // send a plain text message
    msg.setContent(msgText, "text/plain");
    System.out.println("fif");
    else
    System.out.println("felsd");
    // send a multipart message// create and fill the first message part
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setContent(msgText, "text/plain");
    // create and fill the second message part
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setContent(msgText2, "text/plain");
    // create the Multipart and its parts to it
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    // add the Multipart to the message
    msg.setContent(mp);
    Transport transport = session.getTransport("smtp");
         transport.connect(smtphost,"[email protected]","xyz");
    msg.saveChanges();
    System.out.println("fconn");
              //transport.sendMessage(msg,msg.getAllRecipients());
    transport.sendMessage(msg,msg.getAllRecipients());
    transport.close();     
    //Transport.send(msg);
    catch(MessagingException mex)
    mex.printStackTrace();
    return "Email sent to " + emailto;
    class SMTPAuthenticator extends Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    String username = "[email protected]";
    String password = "xyz";
    return new PasswordAuthentication(username, password);
    i dont understand what the problem is..inspite of having the right code..
    i guess some firewall problem..
    can somebody help me please..il be highly obliged..thanks..

  • Problems while sending mail using java mail..help...

    Hello all,
    I am new to Java Mail...
    Below is my first program...
    Can anybody tell what's wrong in it..??
    Thanks in advance....
    ------------------------------------------------------start--------------------
    package test;
    import java.util.Properties;
    import javax.mail.Address;
    import javax.mail.Authenticator;
    import javax.mail.MessagingException;
    import javax.mail.NoSuchProviderException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.Message.RecipientType;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class Send
         public Send()
         public void send()
              java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              Properties props=new Properties();
              props.put("mail.transport.protocol", "smtp");
              props.put("mail.smtp.host","smtp.gmail.com");
              props.put("mail.smtp.port","25");
              props.put("mail.smtp.auth","true");
              Session session=Session.getDefaultInstance(props,new MyAuthenticator());
              session.setDebug(true);
              MimeMessage message=new MimeMessage(session);
              try
                   message.setContent("Hello ...","text/plain");
                   message.setSubject("Test mail...plz don't ignore..");
                   Address to=new InternetAddress("[email protected]");
                   Address from=new InternetAddress("[email protected]");
                   Address replyTo=new InternetAddress("[email protected]");
                   message.setFrom(from);
                   message.setReplyTo(new Address[]{replyTo});
                   message.setRecipient(RecipientType.TO,to);               
                   Transport.send(message);
              } catch (AddressException e)
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (NoSuchProviderException e)
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (MessagingException e)
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public static void main(String[] args)
              new Send().send();          
         class MyAuthenticator extends Authenticator
              MyAuthenticator()
                   super();
              protected PasswordAuthentication getPasswordAuthentication()
                   return new PasswordAuthentication("[email protected]", "*******");
    --------------------------------------------end--------------
    here is the output.....
    DEBUG: setDebug: JavaMail version 1.3.2
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
    220 mx.gmail.com ESMTP 16sm2443823wrl
    DEBUG SMTP: connected to host "smtp.gmail.com", port: 25
    EHLO jijo
    250-mx.gmail.com at your service
    250-SIZE 20971520
    250-8BITMIME
    250-STARTTLS
    250 ENHANCEDSTATUSCODES
    DEBUG SMTP: Found extension "SIZE", arg "20971520"
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: Found extension "STARTTLS", arg ""
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    530 5.7.0 Must issue a STARTTLS command first
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1275)
         at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:895)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:524)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at test.Send.send(Send.java:50)
         at test.Send.main(Send.java:68)
    QUIT
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1275)
         at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:895)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:524)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at test.Send.send(Send.java:50)
         at test.Send.main(Send.java:68)
    Can any body help me..??
    Thanks and Regards
    Jijo vincent

    Hi All,
    I am new to javax.mail.
    I have attached my code and also error here...
    can anyone help to resolve the error?
    Code:
    public class MailExample {
         public static void main(String args[]) {
              try {
              String host = "localhost"; //args[0];
              String from = "[email protected]"; //args[1];
    //          String to = "[email protected]";//args[2];
              String to = "[email protected]";//args[2];
              java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              // Get system properties
              Properties props = System.getProperties();
              // Setup mail server
              props.put("mail.smtp.host", host);
              props.put("mail.smtp.starttls.enable","true");
              //props.put("mail.smtp.auth","true");
              // Get session
              Session session = Session.getDefaultInstance(props, null);
              session.setDebug(true);
              // Define message
              MimeMessage message = new MimeMessage(session);
              // Set the from address
              message.setFrom(new InternetAddress(from));
              // Set the to address
              message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
              // Set the subject
              message.setSubject("Hello JavaMail");
              // Set the content
              message.setText("Welcome to JavaMail");
              // Send message
              Transport.send(message);
              catch(AddressException ae){
                   ae.printStackTrace();
              }catch (MessagingException e)
    //               TODO Auto-generated catch block
                   e.printStackTrace();
    Error:
    DEBUG: setDebug: JavaMail version 1.3.3ea
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
    220 localhost
    DEBUG SMTP: connected to host "localhost", port: 25
    EHLO HDCHCTDAM33726
    250-localhost
    250 HELP
    DEBUG SMTP: Found extension "HELP", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 [email protected] Address Okay
    RCPT TO:<[email protected]>
    250 [email protected] Address Okay
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    Message-ID: <10736847.01125315340863.JavaMail.sangeetham@HDCHCTDAM33726>
    From: [email protected]
    To: [email protected]
    Subject: Hello JavaMail
    MIME-Version: 1.0
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Welcome to JavaMail
    com.sun.mail.smtp.SMTPSendFailedException: 550 Invalid recipient: [email protected]
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1333)
         at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1160)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:538)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at org.worldbank.webmfr.util.MailExample.main(MailExample.java:55)550 Invalid recipient: [email protected]
    com.sun.mail.smtp.SMTPSendFailedException: 550 Invalid recipient: [email protected]
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1333)
         at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1160)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:538)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at org.worldbank.webmfr.util.MailExample.main(MailExample.java:55)
    QUIT

  • Problem with sending mail throgh java mail api

    hi folks,
    We are having problem regarding sending mail using java mail api.
    we are using msgsendsample.java file from demo folder contained in javamail-1.3.3_01 folder.
    we are using following command at dos prompt.:
    java msgsendsample [email protected] [email protected] smtp.mail.yahoo.com false
    It gives following Exception:
    --Exception handling in msgsendsample.java
    com.sun.mail.smtp.SMTPSendFailedException: 530 authentication required - for hel
    p go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
    333) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:906)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:535)
    at javax.mail.Transport.send0(Transport.java:151)
    at javax.mail.Transport.send(Transport.java:80)
    at msgsendsample.main(msgsendsample.java:93)
    ** ValidUnsent Addresses
    [email protected]
    Thanking in Advance...
    Please give us guidance to any alternate solution if exists.

    hi
    the smtp server u are using should allow u to send mail to other smtp server like if u r sending mail to yahoo account u have to use yahoo smtp server only .....
    bye

  • TS3276 Anyone experiencing problems sending mail using TalkTalk - can receive but not send  - was ok up until pm 24/08/12 - have recently loaded Mountain Lion patch could this be the problem?

    Anyone experiencing problems sending mail using Apple Mail viaTalkTalk - can receive but not send  - was ok up until pm 24/08/12 - have recently loaded Mountain Lion patch could this be the problem?

    jag157 wrote:
    "I managed to solve the problem. Under smtp settings (mail preferences/accounts/edit smtp) I set the outgoing port to 25 (as recommended by Talktalk), no authentication (set to none) and unchecked SSL. I found that until I set the port to 25 and authentication to none I was unable to uncheck SSL. One I had done this I was able to send from my main email and other email adddresses set up under my account."
    Superb advice R&W!  My email sending block using TalkTalk started 2 months ago using Snow Leopard, continued when I upgraded to 10.8.2, and has been persistent on my wife's new iPad (IOS 6.1).  Implementing your wise words has fixed all that, and now enables me to call her on FaceTime — previously only she could call me.  Thank you so much; this will save hours of further fruitless searching and phoning.
    Please remember that your email is now insecure, if you wish to have a secure connection SSL must be on and port 25 should be avoided.

  • Problem Sending mail Using Godaddy

    Hi all. I will be very thank to all. Please help me.!!!
    I have small problem while I send mail using Godaddy smtpout server. It is my code :
         Properties props = System.getProperties();
         props.setProperty("mail.transport.protocol", "smtp");
         props.setProperty("mail.host", "smtpout.secureserver.net");
         props.put("mail.smtp.auth", "true");
         props.setProperty("mail.user", "fengshuiMail");
         props.setProperty("mail.password", "here_my_password");
         Session mailSession = Session.getDefaultInstance(props, null);
         mailSession.setDebug(true);
         Transport transport = mailSession.getTransport("smtp");
         MimeMessage message = new MimeMessage(mailSession);
         message.setSentDate(new Date());
         message.setSubject("Feng Shui 5 Saved Reference ");
         message.setFrom(new InternetAddress("[email protected]"));
                   message.addRecipient(Message.RecipientType.TO, new InternetAddress("my_email_here"));
         MimeMultipart multipart = new MimeMultipart("related");
         // first part (the html)
         BodyPart messageBodyPart = new MimeBodyPart();
         messageBodyPart.setContent("TestMail", "text/plain");
         // add it
         multipart.addBodyPart(messageBodyPart);
         // put everything together
         message.setContent(multipart);
         transport.connect("smtpout.secureserver.net", "fengshuiMail",
                             "here_my_password");
         transport.sendMessage(message, message
                             .getRecipients(Message.RecipientType.TO));
         transport.close();I receive this exceptions :
    java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) java.security.AccessController.checkPermission(AccessController.java:427) java.lang.SecurityManager.checkPermission(SecurityManager.java:532) java.lang.SecurityManager.checkConnect(SecurityManager.java:1031) java.net.InetAddress.getAllByName0(InetAddress.java:1117) java.net.InetAddress.getAllByName0(InetAddress.java:1098) java.net.InetAddress.getAllByName(InetAddress.java:1061) java.net.InetAddress.getByName(InetAddress.java:958) java.net.InetSocketAddress.(InetSocketAddress.java:124) java.net.Socket.(Socket.java:178) com.sun.mail.util.SocketFetcher.getSocket0(SocketFetcher.java:130) com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:112) com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:959) com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:197) javax.mail.Service.connect(Service.java:233) javax.mail.Service.connect(Service.java:134) Email.doGet(Email.java:63) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:140) java.security.AccessController.doPrivileged(Native Method) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:417) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) java.lang.Thread.run(Thread.java:595)
    But from my local machine it work good. From godaddy server it NOt send mail.

    Hey there,
    I am running into the same issue.
    I am not able to send emails from my email account with godaddy to gmail accounts.
    I tried your code with relay----- SMTP server, but it didn't work.
    Could you please give me the complete working code?
    It will be quite a help.
    Thanks.
    Ajeet

  • Cannot Send Mail using AIM account.

    I can receive mail fine but when I try to send mail I get the following message:
    Cannot send mail using the server smtp.aim.com:EmilyLozano.
    Use the pop-up menu below to try a different outgoing mail server. All messages will use this server until you quit Mail or change your network settings.
    Message from: Emily Lozano <[email protected]>
    I left for a trip a few days ago, came back and now for no apparent reason cannot send mail as I always have. I have reconfigured the port to 587 and that did not help. Any suggestions? (I can send and receive fine via the web, but I really hate it.)

    I'm glad you got it figured out. So many times people on this forum sit around waiting for help when they could have retraced their steps, like you did, to figure out the source of the problem.

  • Send mail using Internal Mail server doesn't work

    I can't send mail using my companies mail server, which requires authentication and port 587 to send.  We have a valid, non self-signed SSL certificate so that is not the issue.  I can send mail using Bell's mail server but that violates our regulatory compliance obligations. 
    The server using POP3 and one must login to get mail as well as send.  Unfortunately there is no otehr error message than the: error sending "mail subject".  No further details are provided and when we check the mail servers logs its clear the Pre isn't even attempting to connect to the mail server.  So the request to send mail isn't even being sent out.  That could be an issue with the Pre or with Bell but Bell support will only troubleshoot to the point of fidning out if you can send using their mail server.  We can so their support stops at that point.
    I still have v1.3.1 of the WebOS as v1.3.5 doesn't seem to be out for the Bell Pre's yet.  But from what I've read v1.3.5 is even worse at handling mail not better.  However, there may be a solution out there to this beyond sending the Pre's back (I doubt we can) as Balckberry's and iPhone's don't have this issue.
    Any advice is greatly appreciated.
    Post relates to: Pre p100eww (Bell)

    Further update on this problem.  It does send if I use TLS instead of SSL so that must mean that the Palm Pre doesn't use SSLv3 or higher.  As TLS is a viable security setting option to maintain compliance I can use that.  But still Plam should seriously consider upgrading tis SSL versioning.

  • Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send..

    Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send Code 501..
    Need help with T-bird.. My OS is Win XP-64..Have been using Mozilla for about 10 years with little or no problems.. This happened when I upgraded to 3.17.. Spent hours on T-Bird diagnostics web site.. Called Comcast & talked to a net tech.. he ran some tests on his end & had me log into my Comcast e-mail account & all worked well,, so he concluded the problem was in T-Bird.. He had me change my port to 587 & disable connection security & authentication to none & I was able to send mail.. That was all he could do.. Comcast was working.. the problem is in T-Bird.. Can any one help with this problem.. I don't want to send mail with my password transmitted insecurely..
    Thanks
    Richard

    It was not intended to be "snide". You said two separate things that at face value would be out of the ordinary.
    I considered if it might be a typo for 31.7. Since 31.5 is the current formal release, I would have to thank you for volunteering to test a pre-release beta version. If it was truly 3.1.7 then it would appear that you have chosen, or have become stuck with a somewhat ancient version. In either case it's harder to reach out to you with any meaningful comments or advice. However I do watch various other sites and newsgroups and I don't see a clamour of distressed users, so it seems fair to suppose that this feature isn't actually broken in 31.7.
    And you said XP 64. XP is obsolete and no longer supported and if there is a 64-bit version, then again you have set yourself apart from the mainstream.
    I had a look at the comcast site and found some puzzling recommendations. Some users come here asking how to set up a secured connection in Thunderbird when it isn't offered by the server. Comcast are different, in that they mention the ports 143 and 587, and also 993 and 465. So far so good, in that security is actually on offer, but they also suggest that you enable SSL, regardless of which port is being used. It would be unusual and unconventional to offer TLS or SSL on ports 143 and 587. STARTTLS would be more credible on these ports.
    Have you tried IMAP on 993 and SMTP on 465? SMTP on 587 with SSL, or TLS, is not impossible, but is improbable.

  • Problem in sending mails to multiple persons

    Hi,
    I have a problem in sending mails to multiple people....
    My mail is using the local smtp server...The mail is to be send to multiple addresses in to and cc.
    for e.g the to address will have --> [email protected];[email protected]
    cc address will have --> [email protected];[email protected]
    How do this i.e set multiple to and cc address...
    My function that sends mail from my ejb looks like this...
    // create some properties and get the default Session
         Properties props = new Properties();
         props.put("mail.smtp.host", host);
         Session session = Session.getDefaultInstance(props, null);
         try{
         Message msg = new MimeMessage(session);
         msg.setFrom(new InternetAddress(from));
    //I HAVE TO SET MULTIPLE "TO" ADDRESSES HERE INSTEAD OF JUST 1
         InternetAddress[] address = {new InternetAddress(to)};
         msg.setRecipients(Message.RecipientType.TO, address);
    //I HAVE TO SET MULTIPLE "CC" ADDRESSES HERE INSTEAD OF JUST 1
    InternetAddress[] addresscc = {new InternetAddress(cc)};
         msg.setRecipients(Message.RecipientType.CC, addresscc);
         msg.setSubject(msgSubj);
         msg.setSentDate(new java.util.Date());
         msg.setText(msgText);
         Transport.send(msg);
         }catch (MessagingException ex) {
    System.out.println("\nException handling in javaMail.java :" + ex);
    Please help me out with a solution!!!Thanks in advance.
    Thanks
    Rahul

    Hi all,
    Got the solution...
    We have to use addRecipients method of the Message class to add as many receipts we want to set.
    example: Message.addRecipients(type,address).
    Thanks
    Rahul

Maybe you are looking for

  • Is there a product for the IMac that is essentially a sales contact software?  I am a user of ACT Contact Software for pcs

    Is there a sales contact software (database) for the IMAC?  I have been using ACT Contact software for the pc for years.

  • Select Client

    Hi, My requirement is--- to not display the clients which have Zero in all status which are Pending,Exp,Backorder, Error.Please help me to fix it as it takes 9 mins to run which is just acceptable but it should not take more than that. Here is the qu

  • Compton-git question [Solved]

    Hi After doing a little bit of research and installing compton-git and removing xcompmgr  i added compton -f to .xinitrc and i concur it works and is way better than xcompmgr (with xcompmgr tilda,tmux would stay on top no matter if it was set not too

  • FM or BAPI for Time Events Calculation

    Hi Experts,     Is there any standard BAPI or FM that calculates time events and get total working hours?

  • 2D application scroll problem

    Hi, maybe someone can help me with a problem I currently have: I programmed a 2D application which uses the "G" Library of Geosoft (http://geosoft.no/graphics/index.html). This library is built on top of the Java 2D API. My application draws about 10