Mail sent through JavaMail gets sent back

We use JavaMail to send e-mails out with PDF attachments. About 15% of the time, the mail comes back with the message javax.mail.MessagingException. When we send the same e-mail a few minutes later, it goes through without any problem.
Any ideas what could be causing this?

You need to look at the details. All MessagingException is telling you is that something
failed. You need to know what failed. Print out the details of the exception, possibly
including the stack trace. Also, you might want to turn on session debugging and look
at the protocol trace it prints out.

Similar Messages

  • I deleted the tab for inbox in mail how do I get it back?

    I deleted the tab for inbox in mail how do I get it back? The small oval tab next to sent box and flagged, just under the taskbar.

    Is this where the icon was ?

  • I recently upgraded to maverick and i lost 2 apps i want back they are network utility and mail how can i get them back or where can i find them to download

    i recently upgraded to maverick and i lost 2 apps i want back they are network utility and mail how can i get them back or where can i find them to download

    Hi megamike1969,
    I've been losing some apps also in the Dock. As Niel said I think is that you may be able to just drag them back to the Dock, if you can find them.
    What I do is open Launchpad and while you're in there, drag the application to the Dock. If you can't locate the apps, then disregard this post.
    gl,
    kel

  • After updating to Mavericks MAIL no longer issues a "whoosh" sound when sending mail.  Can I get it back?

    After updating to Mavericks MAIL no longer issues a "whoosh" sound when sending mail.  Can I get it back?

    If restarting did not resolve the issue, open Mail Preferences and make sure the box next to "Play sounds for other mail actions" is checked.

  • Icloud has taken my mail ,how do i get it back to my inbox?

    i am not sure how to use icloud but for now i have lost the mail i my inbox and im sure its in icloud. how cani get my mail to show up i my inbox.Thanks for any help

    Did you check your mail at the website, www.iCloud.com?

  • MBP - lost Junk mail folder, how to get it back?

    As the message says, somehow it got deleted and I can't figure out how to make  new one
    thanks

    Hello, is this an IMAP or POP account?
    We might start with this since the mysterious loss raises concerns for me...
    Not certain, but this can fix myriad Mail problems...
    Safe Boot from the HD, (holding Shift key down at bootup),  it will try to repair your Disk Directory while the spinning radian is happening, so let it go, run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move this folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.
    If that doesn't do it and you can afford to redo all your Rules, try these & reboot...
    /Users/YourUserName/Library/Mail/MessageRules.plist
    /Users/YourUserName/Library/Mail/MessageRules.plist.backup
    Note, in 10.5 & up /Users/YourUserName/Library/Caches/Mail/ does not exist.

  • Lost trash can, etc. in Mail window-how to get it back?

    When reading a message, I used to see icons at the bottom of the screen, including the trash icon. (I think there was a reply and forward icon as well). As of today, all those icons are missing. It's just any empty bar.
    I saw the advice about turning the Archive function off, but it was off and has been off (as far as I know) since I got the phone. I am using  I have an iPhone 5 running 6.1.4.

    It never fails. Once I post a question, the solution presents itself. I did a restart, and now the icons are back. Yay!

  • I plugged in my iphone then i took my iphone out of the computer then all my notes were gone exept for one how can i get them back?

    they are not in my mail how can i get them back?

    have you tried a hard reset, if not try this
    it doesn't matter whether the phone is on or not to start with
    Press-hold the Home button (big circle below the screen) and the Sleep/Wake button (on top of the iPhone) simultaneously.
    Continue holding both buttons (Ignore the "Slide to power off") until the iPhone shuts off and begins to restart.
    You may let go when you see the silver Apple logo.
    You have completed a hard reset successfully.

  • TS3276 My mail account has gone off line.  How do I get it back on line?  I think I sent an email file that was too big.

    My mail account has gone off line.  How do I get it back on line?  I think I sent an email file that was too big.

    Hi,
    When you have the browser open (Internet Explorer) then press the Alt key on the keyboard. It should show you the file options at the top..Then uncheck work offline and check..
    Note:
    If you have HP Support Assistant installed on the computer(The Blue Question Mark) then open it ==> Complete all pending Updates & Tuneups==> Restart and Check. It may solve your problem
    Although I am an HP employee, I am speaking for myself and not for HP.
    **Click on “Kudos” Star if you think this reply helped** Or Mark it as "Solved" if issue got fixed.

  • My Sent mail Notification no longer plays. How do I get it back?

    The Sent mail Sound is no longer working. Is there a known issue with this or how can I get it back?

    If the Favorite  bar is hidden, click "View" menu in the Safari menu bar and select "Show Favorites Bar".
    If Favorites Bar is not hidden, click view menu in the Safari menu bar and then "Customize Toolbar".
    Drag the "Top Sites"  icon from the sheet that drops down in to the Favorites bar.

  • I have a problem with a few emails i wrote which were in the outbox. The outbox disappeared all of a sudden with my mails... However they were not sent since the email address was not correct (just 3 initials). Is there a way to get it back somewhere?

    Hello,
    I have a problem with a few emails i wrote which were in the outbox. The outbox disappeared all of a sudden with my mails... However they were not sent since the email address was not correct (just 3 initials). I was waiting to find out the correct email address of that person, put in in and then sen it...Is there a way to get it back somewhere on the ipad or in some cached folder?
    Many thanks for an answe to this.
    Swisslady2

    There is no cache where the emails would be stored on the iPad, but you could try quitting the mail app and then launch it again and see if the emails return.
    Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Tap the home button. Then try mail again.

  • When I try to read Yahoo mail on Mozilla, I keep getting sent back to the "type in password" page and I can't get into my mail.

    I can open Yahoo mail in Explorer but I prefer Firefox. I can get into one of my e-mail accounts on web server but when I click onto another account, I keep getting tossed back to type in password on and on... and not able to get into my accounts.

    Please see solution in http://kb.mozillazine.org/Problematic_extensions
    for "McAfee Site Advisor".
    (Windows): For best results you should uninstall '''McAfee Site Advisor''' from Control Panel > add/change programs (Programs and Features). Reboot the system. Then Reinstall from http://www.siteadvisor.com/ and reboot the system. When installing refuse other suggested (crapware) applications.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • Getting error while sending mail through javamail api

    I can able to compile the following code successfully but while executing it showing the error
    C:\Program Files\Java\javamail-1.4\demo>java msgsend -o [email protected] -M 203.112.158.188 [email protected]
    Exception in thread "main" java.lang.NoClassDefFoundError: msgsend
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class msgsend {
    public static void main(String[] argv) {
         String to, subject = null, from = null,
              cc = null, bcc = null, url = null;
         String mailhost = "null";
         String mailer = "msgsend";
         String file = null;
         String protocol = null, host = null, user = null, password = null;
         String record = null;     // name of folder in which to record mail
         boolean debug = false;
         BufferedReader in =
                   new BufferedReader(new InputStreamReader(System.in));
         int optind;
         for (optind = 0; optind < argv.length; optind++) {
         if (argv[optind].equals("-T")) {
              protocol = argv[++optind];
         } else if (argv[optind].equals("-H")) {
              host = argv[++optind];
         } else if (argv[optind].equals("-U")) {
              user = argv[++optind];
         } else if (argv[optind].equals("-P")) {
              password = argv[++optind];
         } else if (argv[optind].equals("-M")) {
              mailhost = argv[++optind];
         } else if (argv[optind].equals("-f")) {
              record = argv[++optind];
         } else if (argv[optind].equals("-a")) {
              file = argv[++optind];
         } else if (argv[optind].equals("-s")) {
              subject = argv[++optind];
         } else if (argv[optind].equals("-o")) { // originator
              from = argv[++optind];
         } else if (argv[optind].equals("-c")) {
              cc = argv[++optind];
         } else if (argv[optind].equals("-b")) {
              bcc = argv[++optind];
         } else if (argv[optind].equals("-L")) {
              url = argv[++optind];
         } else if (argv[optind].equals("-d")) {
              debug = true;
         } else if (argv[optind].equals("--")) {
              optind++;
              break;
         } else if (argv[optind].startsWith("-")) {
              System.out.println(
    "Usage: msgsend [[-L store-url] | [-T prot] [-H host] [-U user] [-P passwd]]");
              System.out.println(
    "\t[-s subject] [-o from-address] [-c cc-addresses] [-b bcc-addresses]");
              System.out.println(
    "\t[-f record-mailbox] [-M transport-host] [-a attach-file] [-d] [address]");
              System.exit(1);
         } else {
              break;
         try {
         if (optind < argv.length) {
              // XXX - concatenate all remaining arguments
              to = argv[optind];
              System.out.println("To: " + to);
         } else {
              System.out.print("To: ");
              System.out.flush();
              to = in.readLine();
         if (subject == null) {
              System.out.print("Subject: ");
              System.out.flush();
              subject = in.readLine();
         } else {
              System.out.println("Subject: " + subject);
         Properties props = System.getProperties();
         // XXX - could use Session.getTransport() and Transport.connect()
         // XXX - assume we're using SMTP
         if (mailhost != null)
              props.put("mail.smtp.host", mailhost);
         // Get a Session object
         Session session = Session.getInstance(props, null);
         if (debug)
              session.setDebug(true);
         // construct the message
         Message msg = new MimeMessage(session);
         if (from != null)
              msg.setFrom(new InternetAddress(from));
         else
              msg.setFrom();
         msg.setRecipients(Message.RecipientType.TO,
                             InternetAddress.parse(to, false));
         if (cc != null)
              msg.setRecipients(Message.RecipientType.CC,
                             InternetAddress.parse(cc, false));
         if (bcc != null)
              msg.setRecipients(Message.RecipientType.BCC,
                             InternetAddress.parse(bcc, false));
         msg.setSubject(subject);
         String text = collect(in);
         if (file != null) {
              // Attach the specified file.
              // We need a multipart message to hold the attachment.
              MimeBodyPart mbp1 = new MimeBodyPart();
              mbp1.setText(text);
              MimeBodyPart mbp2 = new MimeBodyPart();
              mbp2.attachFile(file);
              MimeMultipart mp = new MimeMultipart();
              mp.addBodyPart(mbp1);
              mp.addBodyPart(mbp2);
              msg.setContent(mp);
         } else {
              // If the desired charset is known, you can use
              // setText(text, charset)
              msg.setText(text);
         msg.setHeader("X-Mailer", mailer);
         msg.setSentDate(new Date());
         // send the thing off
         Transport.send(msg);
         System.out.println("\nMail was sent successfully.");
         // Keep a copy, if requested.
         if (record != null) {
              // Get a Store object
              Store store = null;
              if (url != null) {
              URLName urln = new URLName(url);
              store = session.getStore(urln);
              store.connect();
              } else {
              if (protocol != null)          
                   store = session.getStore(protocol);
              else
                   store = session.getStore();
              // Connect
              if (host != null || user != null || password != null)
                   store.connect(host, user, password);
              else
                   store.connect();
              // Get record Folder. Create if it does not exist.
              Folder folder = store.getFolder(record);
              if (folder == null) {
              System.err.println("Can't get record folder.");
              System.exit(1);
              if (!folder.exists())
              folder.create(Folder.HOLDS_MESSAGES);
              Message[] msgs = new Message[1];
              msgs[0] = msg;
              folder.appendMessages(msgs);
              System.out.println("Mail was recorded successfully.");
         } catch (Exception e) {
         e.printStackTrace();
    public static String collect(BufferedReader in) throws IOException {
         String line;
         StringBuffer sb = new StringBuffer();
         while ((line = in.readLine()) != null) {
         sb.append(line);
         sb.append("\n");
         return sb.toString();
    So please help me to resolve that error.

    The directory that contains msgsend.class (usually the current directory)
    is not in your CLASSPATH setting. Be sure that "." is included as one of the
    entries in CLASSPATH.

  • Mail notifications are not getting sent from a Calendar client

    Mail notifications are not getting sent from a Calendar client
    <p>
    On the client, after creating an event and electing to send a mail notification,
    the following error appears in a pop up box:
    "module:mailmsg.ctp,label 190, service error"
    Also, in the /users/unison/log/cws.log file on the Calendar Server, there is an
    error from the corresponding time that the client receives one:
    DEXOTEK ERRCODE Ox132B0 -> CWTCP_RemoteSecurityModified: RNC_SecurityModified
    -> Request 0x443 for NodeId 10002,
    status set to CANTSERVICE
    Solution:
    If this is only happening for one user, then check for the presence of a dbv.log
    file in the /users/unison/log directory. If present this implies db corruption
    and the /users/unison/bin/unidbfix tool should be run.
    Note: For details on "unidbfix", please read the man page and also the online
    Calendar Administrators Guide.

    I am having the exact same problem sending through a comcast smtp server to a mac.com email address:
    Reporting-MTA: dns; qmta11.emeryville.ca.mail.comcast.net
    so some problem they are having in emeryville today? I too am waiting for it to clear up.

  • When I send an email with bcc recipients, the bcc does not show in my sent mail so I can't reference back later who I sent the email to. Worked in Snow Leopard but not in Yosemite. Please advise if their is fix for that.

    When I send an email with bcc recipients, the bcc does not show in my sent mail so I can't reference back later who I sent the email to. Worked in Snow Leopard but not in Yosemite. Please advise if their is fix for that.

    Did you select View->Bcc Address Field from the menu bar?

Maybe you are looking for