IPhone now sends emails using the wrong Exchange server

I have 2 ActiveSync exchange accounts setup on my iPhone 4S, Gmail and Hotmail.  I have had this setup for awhile, and all of a sudden messages sent with a from: address of gmail.com is being sent by Hotmail.  The message appears in my Hotmail outbox, and headers reveal that it is being sent from hotmail on behalf of gmail.  This was never a problem in the past.  The default account is set to Gmail, and there is no SMTP account since it is Exchange-based.
Thanks.

I have the exact same issue reported here.  I have deleted all my mail account and re-added them.  The problem persists.  It does not seem to matter in what order I add the accounts, the messages always are sent from the live.com Exchange account, even if the message shows it is being sent from my work email.  If I delete the live.com account, things work just fine, but as soon as I add it back in, all mail routes through it.  I can see messages that should have been sent through my work Exchange server in the sent items on live.com.  This seems like a very bad bug in IOS...

Similar Messages

  • Error while sending email using TemplateEmailSender in CSC server

    Hi,
    We are trying to send email using TemplateEmailSender from CSC server. But it is giving Null Pointer Exception in ProfiledMessageSource like below. The same code is working fine in commerce instance but it is failing in CSC instance. We are using ATG2007.1p3
    Any pointers would be helpful.
    Below is the error.
    Error while sending email
    java.lang.NullPointerException
            at atg.userprofiling.dms.ProfiledMessageSource.isConfiguredForProfileSubject(ProfiledMessageSource.java:196)
            at atg.userprofiling.dms.DPSMessageSource.fireEndSessionMessage(DPSMessageSource.java:864)
            at atg.userprofiling.dms.DPSMessageSource.fireEndSessionMessage(DPSMessageSource.java:848)
            at atg.userprofiling.SessionEventTrigger.nameContextElementPreUnbound(SessionEventTrigger.java:553)
            at atg.nucleus.GenericContext.sendPreUnboundEvent(GenericContext.java:200)
            at atg.nucleus.GenericContext.preNotifyRemovedObject(GenericContext.java:528)
            at atg.nucleus.GenericContext.removeElement(GenericContext.java:566)
            at atg.servlet.SessionNameContext.unbindFromNameContext(SessionNameContext.java:557)
            at atg.servlet.SessionNameContext.stopSession(SessionNameContext.java:534)
            at atg.servlet.SessionNameContext.decrementWrapperCount(SessionNameContext.java:242)
            at atg.servlet.SessionBindingReporter.valueUnbound(SessionBindingReporter.java:206)
            at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1625)
            at org.apache.catalina.session.StandardSession.expire(StandardSession.java:749)
            at org.apache.catalina.session.StandardSession.expire(StandardSession.java:655)
            at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1100)
            at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
            at atg.userprofiling.email.TemplateInvoker$TemplateSession.endSession(TemplateInvoker.java:935)
            at atg.userprofiling.email.TemplateEmailSender.createMessage(TemplateEmailSender.java:2387)

    Thanks for the reply.
    My issue is fixed now. It is JBOSS configuration issue. Sessions are not maintained properly that's why we are getting NULL profile in the session. Our application has multiple WARs so we fixed it by setting emptySessionPath to TRUE. If emptySessionPath attribute in server.xml is false, then each WAR will have its own jsessionid cookie.
    I did not touch ProfiledMessageSource as its required for session triggering.

  • My iPhone email keeps sending email from the wrong account!

    My iPhone keeps sending email out from my gmail account instead of my "Default Account." Is there a setting some where or some way to fix this? Thanks for any help you can provide.

    Ouch, I'm afraid we have a damaged pref file, likely the main...
    /Users/YourUserName/Library/Preferences/com.apple.mail.plist
    Trouble is it holds al the most important info, so I'd try this first...
    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.
    Instead of deleteing that main plist, we might be able to use PrefSetter to make a new good copy...
    https://discussions.apple.com/message/17510029#17510029

  • IPhone cannot send email using Yahoo account. iPhone no envia correo Yahoo.

    Hi Everyone,
    I just got my iPhone from Movistar Venezuela and I've found I'm unable to send email using my Yahoo account. However, I can receive Yahoo email just fine (paid $20 for Mail Plus subscription), my GMail account can send and receive perfectly, and I can go surfin' Safari with no problems too.
    The error message I get is "Cannot send mail: an error occurred while delivering this message". I called Movistar Customer Support and they said everything was fine on their end...
    In typical Apple fashion, the error message is so simple I have no idea where the problem is. Does anyone know how can I get more information and how to solve this annoying problem? My Yahoo account is actually my primary account...
    Thanks in advance!
    Saludos a todos,
    Acabo de comprarme un iPhone de Movistar en Venezuela y me encuentro sin poder enviar emails con mi cuenta Yahoo. Sin embargo, si puedo recibir correo Yahoo bien (pague $20 por mi suscripcion a Mail Plus), mi cuenta de GMail si puede enviar y recibir email sin problema y puedo navergar con Safari sin ningun problema.
    El mensaje de error que recibo es el siguiente": "No se puede enviar correo: se ha producido un error al enviar el mensaje". Llame a Atencion al Cliente de Movistar y me dijeron que no habia ningun problema con mi linea o con su servicio de datos...
    Como tipica cosa Apple, el mensaje de error es tan simple que no tengo NI IDEA de cual es el problema. Alguien mas ha sufrido este problema? Sabe alguien como puedo obtener mas informacion de este error y como solucionarlo? Lamentablemente, mi cuenta Yahoo es mi correo principal...
    Gracias de antemano!

    Creo que resolvi el problema, temporalmente.
    1) Borra tu cuenta
    2) Vuelvela a crear
    3) Ve a Ajustes
    4) Ve a Mail Contactos Calendarios
    5) Ve a la cuenta problematica
    6) Ve a SMTP
    7) Anadir nuevo
    8)
    Nombre servidor: smtp.mail.yahoo.com
    Nombre de usuario: no dejar vacio
    Contrasena: no dejar vacio
    Usar SSL: si
    Autenticacion: Contrasena
    Puerto del Servidor: 25
    Lo consegui de aqui: http://www.emailaddressmanager.com/tips/mail-settings.html
    Dime que tal te funciona.
    I think I solved the issue, temporarily at least
    1) Delete account
    2) Create again
    3) Go to settings
    4) Go to Mail, Contacts, Calendars
    5) Open problematic account
    6) Go to SMTP
    7) Add a new server
    8)
    Name: smtp.mail.yahoo.com
    User name: do not leave blank
    Password: do not leave blank
    SSL: Yes
    Autentication: Password
    Port: 25
    I got this info from: http://www.emailaddressmanager.com/tips/mail-settings.html
    Let me know how this works

  • Is it possible to send emails using the package SendMailJPKG in HTML format

    Hi
    I am trying to find out if there is a way to send an email using the SendMailJPKG in HTML format.
    I would also want to add an image in the signature of the email.
    Please help.
    regards

    We are in 9i, should be probably UTL_SMTP. please verify if UTL_MAIL will work on 9iUTL_MAIL is new feature in V10.
    Install a V10 DB, then invoke UTL_MAIL via dblink from V9 to V10.
    Attachments can be done in V9, but it is a non-trivial effort to do so.
    I suspect that GOOGLE can find a working example.

  • How do I read a Email from the MS exchange server

    could any one tell me as to how i could read the mail from the exchange server and store it in a seperate folder.

    I have an application which reads the mail from our mail server and then writes the body of the message into a file and then deletes the email anf those values are then read from that file and stored into the database .
    Here is the code which pops the mail from the exchange server and then stores it into a file .
    import javax.mail.*;
    import com.sun.mail.pop3.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.util.*;
    * Title:
    * Description:
    * Copyright: Copyright (c) 2001
    * Company:
    * @author
    * @version 1.0
    public class SunMailConnection implements Runnable{
         boolean suspendFlag;
         ErrorLogWriter log = new ErrorLogWriter("SunMail.log");
         public SunMailConnection() {
              this.start() ;
         public void run(){
              try {
                   int start = 1;int end = -1;
                   String host = "cyde-cehh-exh1";//the local exchange server name AND DOESNT WORK IF U CONNECT TO EXT MAIL SERVER DIRECTLY
                   //DUE TO SECURED AUTHORISATION
                   //String host ="http://www.conergy-electronics.de";
                   String username ="SunReader\\Sun\\saa";
                   String password = "xxxxx";
                   // Create empty properties
                   Properties props = new Properties();
                   props.put("mail.protocol.store","pop3");
                   // Get session
                   Session session = Session.getDefaultInstance(props, null);
                   Provider[] p = session.getProviders();
                   //for (int i=0;i<p.length;i++) System.out.println(p.getProtocol());
                   // Get the store
                   Store store = session.getStore("pop3");
                   store.connect(host, username, password);
                   // Get folder
                   Folder folder = store.getFolder("INBOX");
                   if (folder == null || !folder.exists()) {
                        //System.out.println("Invalid folder: " + folder.getName());
                        log.write("Invalid folder: " + folder.getName()) ;
                        System.exit(1);
                   folder.open(Folder.READ_WRITE);
                   //Get the number of Unread Messages
                   int count = folder.getUnreadMessageCount();
                   if (count == 0) { // No messages in the source folder
                        //System.out.println(folder.getName() + " is empty");
                        // Close folder, store and return
                        folder.close(false);
                        store.close();
                        return;
                   if (end == -1)
                        end = count;
                   // Get the message objects to copy
                   log.write("Test");
                   Message[] msgs = folder.getMessages(start, end);
                   //System.out.println("Moving " + msgs.length + " messages");
                   //log.write("Moving " + msgs.length + " messages") ;
                   if (msgs.length != 0) {
                        //If there is any mail
                        //System.out.println(msgs.length );
                        //read mail from server into files
                        MoveMessageTo saveFile = new MoveMessageTo(msgs);
                        if(saveFile.createdFile=true){
                             folder.setFlags(msgs,new Flags(Flags.Flag.SEEN),true);
                             //delete flag set here to remove the email from INBOX
                             folder.setFlags(msgs, new Flags(Flags.Flag.DELETED), true);
                        //folder.expunge(); //removes messages marked as deleted
                        //check for deleting messages
                        for (int i = 0; i < msgs.length; i++) {
                             if (!msgs[i].isSet(Flags.Flag.DELETED))
                                  log.write("Message # "+msgs[i]+" not deleted.");
                             //else System.out.println("Message "+i+"-is deleted") ;
                   // Close connection
                   folder.close(true);
                   // dfolder.close(false);
                   store.close();
                   //this.start() ;
              }catch (Exception ex) {
                   ex.printStackTrace() ;
              //this.t.start();
         public void start(){
              try {
                   while(this!= null){
                        this.run() ;
                        Thread.sleep(15000);//every 15 seconds
              }catch (Exception ex) {
                   ex.printStackTrace();
         public void exit(){
              this.exit();
              System.out.println("Exit");
         public static void main(String[] args) {
              SunMailConnection sunMail = new SunMailConnection();
    This is to show the messages
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class msgshow {
    static String protocol;
    static String host = null;
    static String user = null;
    static String password = null;
    static String mbox = "INBOX";
    static String url = null;
    static int port = -1;
    static boolean verbose = false;
    static boolean debug = false;
    static boolean showStructure = false;
    static boolean showMessage = false;
    public static void main(String argv[]) {
         int msgnum = -1;
         int optind;
         protocol = "pop3";
         host="cyde-cehh-exh1";
         user="SunReader\\Sun\\saa";
         password="xxxxxx";
         mbox="INBOX";
         /*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("-v")) {
              verbose = true;
         } else if (argv[optind].equals("-D")) {
              debug = true;
         } else if (argv[optind].equals("-f")) {
              mbox = argv[++optind];
         } else if (argv[optind].equals("-L")) {
              url = argv[++optind];
         } else if (argv[optind].equals("-p")) {
              port = Integer.parseInt(argv[++optind]);
         } else if (argv[optind].equals("-s")) {
              showStructure = true;
         } else if (argv[optind].equals("-m")) {
              showMessage = true;
         } else if (argv[optind].equals("--")) {
              optind++;
              break;
         } else if (argv[optind].startsWith("-")) {
              System.out.println(
    "Usage: msgshow [-L url] [-T protocol] [-H host] [-p port] [-U user]");
              System.out.println(
    "\t[-P password] [-f mailbox] [msgnum] [-v] [-D] [-s]");
              System.out.println(
    "or msgshow -m [-v] [-D] [-s] < msg");
              System.exit(1);
         } else {
              break;
         try {
         // if (optind < argv.length)
         // msgnum = Integer.parseInt(argv[optind]);
              //msgnum = 5;
         // Get a Properties object
         Properties props = System.getProperties();
         // Get a Session object
         Session session = Session.getDefaultInstance(props, null);
         session.setDebug(debug);
         if (showMessage) {
              MimeMessage msg = new MimeMessage(session, System.in);
              dumpPart(msg);
              System.exit(0);
         // 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, port, user, password);
              else
              store.connect();
         // Open the Folder
         Folder folder = store.getDefaultFolder();
         if (folder == null) {
              System.out.println("No default folder");
              System.exit(1);
         folder = folder.getFolder(mbox);
         if (folder == null) {
              System.out.println("Invalid folder");
              System.exit(1);
         // try to open read/write and if that fails try read-only
         try {
              folder.open(Folder.READ_WRITE);
         } catch (MessagingException ex) {
              folder.open(Folder.READ_ONLY);
         int totalMessages = folder.getMessageCount();
         if (totalMessages == 0) {
              System.out.println("Empty folder");
              folder.close(false);
              store.close();
              System.exit(1);
         if (verbose) {
              int newMessages = folder.getNewMessageCount();
              System.out.println("Total messages = " + totalMessages);
              System.out.println("New messages = " + newMessages);
              System.out.println("-------------------------------");
         if (msgnum == -1) {
              // Attributes & Flags for all messages ..
              Message[] msgs = folder.getMessages();
              // Use a suitable FetchProfile
              FetchProfile fp = new FetchProfile();
              fp.add(FetchProfile.Item.ENVELOPE);
              fp.add(FetchProfile.Item.FLAGS);
              fp.add("X-Mailer");
              folder.fetch(msgs, fp);
              for (int i = 0; i < msgs.length; i++) {
              System.out.println("--------------------------");
              System.out.println("MESSAGE #" + (i + 1) + ":");
              dumpEnvelope(msgs[i]);
              // dumpPart(msgs[i]);
         } else {
              System.out.println("Getting message number: " + msgnum);
              Message m = null;
              try {
              m = folder.getMessage(msgnum);
              dumpPart(m);
              } catch (IndexOutOfBoundsException iex) {
              System.out.println("Message number out of range");
         folder.close(false);
         store.close();
         } catch (Exception ex) {
         System.out.println("Oops, got exception! " + ex.getMessage());
         ex.printStackTrace();
         System.exit(1);
         System.exit(0);
    public static void dumpPart(Part p) throws Exception {
         if (p instanceof Message)
         dumpEnvelope((Message)p);
         /** Dump input stream ..
         InputStream is = p.getInputStream();
         // If "is" is not already buffered, wrap a BufferedInputStream
         // around it.
         if (!(is instanceof BufferedInputStream))
         is = new BufferedInputStream(is);
         int c;
         while ((c = is.read()) != -1)
         System.out.write(c);
         pr("CONTENT-TYPE: " + p.getContentType());
         String filename = p.getFileName();
         if (filename != null)
         pr("FILENAME: " + filename);
         * Using isMimeType to determine the content type avoids
         * fetching the actual content data until we need it.
         if (p.isMimeType("text/plain")) {
         pr("This is plain text");
         pr("---------------------------");
         if (!showStructure)
              System.out.println((String)p.getContent());
         } else if (p.isMimeType("multipart/*")) {
         pr("This is a Multipart");
         pr("---------------------------");
         Multipart mp = (Multipart)p.getContent();
         level++;
         int count = mp.getCount();
         for (int i = 0; i < count; i++)
              dumpPart(mp.getBodyPart(i));
         level--;
         } else if (p.isMimeType("message/rfc822")) {
         pr("This is a Nested Message");
         pr("---------------------------");
         level++;
         dumpPart((Part)p.getContent());
         level--;
         } else if (!showStructure) {
         * If we actually want to see the data, and it's not a
         * MIME type we know, fetch it and check its Java type.
         Object o = p.getContent();
         if (o instanceof String) {
              pr("This is a string");
              pr("---------------------------");
              System.out.println((String)o);
         } else if (o instanceof InputStream) {
              pr("This is just an input stream");
              pr("---------------------------");
              InputStream is = (InputStream)o;
              int c;
              while ((c = is.read()) != -1)
              System.out.write(c);
         } else {
              pr("This is an unknown type");
              pr("---------------------------");
              pr(o.toString());
         } else {
         pr("This is an unknown type");
         pr("---------------------------");
    public static void dumpEnvelope(Message m) throws Exception {
         pr("This is the message envelope");
         pr("---------------------------");
         Address[] a;
         // FROM
         if ((a = m.getFrom()) != null) {
         for (int j = 0; j < a.length; j++)
              pr("FROM: " + a[j].toString());
         // TO
         if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
         for (int j = 0; j < a.length; j++)
              pr("TO: " + a[j].toString());
         // SUBJECT
         pr("SUBJECT: " + m.getSubject());
         // DATE
         Date d = m.getSentDate();
         pr("SendDate: " +
         (d != null ? d.toString() : "UNKNOWN"));
         // FLAGS
         Flags flags = m.getFlags();
         StringBuffer sb = new StringBuffer();
         Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
         boolean first = true;
         for (int i = 0; i < sf.length; i++) {
         String s;
         Flags.Flag f = sf[i];
         if (f == Flags.Flag.ANSWERED)
              s = "\\Answered";
         else if (f == Flags.Flag.DELETED)
              s = "\\Deleted";
         else if (f == Flags.Flag.DRAFT)
              s = "\\Draft";
         else if (f == Flags.Flag.FLAGGED)
              s = "\\Flagged";
         else if (f == Flags.Flag.RECENT)
              s = "\\Recent";
         else if (f == Flags.Flag.SEEN)
              s = "\\Seen";
         else
              continue;     // skip it
         if (first)
              first = false;
         else
              sb.append(' ');
         sb.append(s);
         String[] uf = flags.getUserFlags(); // get the user flag strings
         for (int i = 0; i < uf.length; i++) {
         if (first)
              first = false;
         else
              sb.append(' ');
         sb.append(uf[i]);
         pr("FLAGS: " + sb.toString());
         // X-MAILER
         String[] hdrs = m.getHeader("X-Mailer");
         if (hdrs != null)
         pr("X-Mailer: " + hdrs[0]);
         else
         pr("X-Mailer NOT available");
    static String indentStr = " ";
    static int level = 0;
    * Print a, possibly indented, string.
    public static void pr(String s) {
         if (showStructure)
         System.out.print(indentStr.substring(0, level * 2));
         System.out.println(s);
    This code is to move the message into a file
    import javax.mail.*;
    import com.sun.mail.pop3.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.util.*;
    import java.io.*;
    //This class copies the content of the received e-mail into files. The file names are given by
    //the urgent flag value and the subject
    public class MoveMessageTo {
         boolean createdFile = true;
         static final byte urgentFlagPos=13;
         public MoveMessageTo() {
         public MoveMessageTo(Message[] msgs) {
              if(msgs.length != 0)
              try {
                   for(int i = 0;i<msgs.length ;i++){
                        //Reads the content of the mail into an Object
                        Object currMultipart = msgs[i].getContent();
                        //converts this object into a String and then to a byte array, so we can read the urgnet flag
                        String content=(String)currMultipart;
                        byte[] testBytes=content.getBytes();
                        //The urgent flag is the first digit in the filename
                        StringBuffer fileName=new StringBuffer();
                        if (testBytes.length>urgentFlagPos)
                             fileName.append(new Byte(testBytes[urgentFlagPos]).toString());
                        //Then comes the subject of the e-mail
                        String mailSubject=msgs[i].getSubject();
                        if (mailSubject.length()>0)
                             fileName.append(mailSubject);
                        else fileName.append("noSubject");
                        fileName.append(".dat");
                        //create a directory to save the files
                        File baseDir = new File("c:/EMails/New");
                        baseDir.mkdirs();
                        //create file for with the subject as name
                        File eFile = new File(baseDir+"/"+fileName.toString());// creates a file by name of email subject
                        //Opening an stream for writting to the files
                        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(eFile));
                        ObjectOutputStream oos = new ObjectOutputStream(bos);
                        //Writing the message body to the file
                        oos.writeObject(currMultipart) ;
                        //Closing the stream
                        oos.flush() ;
                        oos.close() ;
                        createdFile = true;
              }catch (Exception ex) {
                   createdFile = false;
                   System.out.println("eFile is not created ");
                   ex.printStackTrace() ;
         public static void main(String[] args) {
              MoveMessageTo moveMessageTo1 = new MoveMessageTo();
    This code is if there is an error in reading a file it will write those error into the file
    import java.io.*;
    import javax.swing.*;
    import java.awt.Color;
    import javax.swing.border.*;
    //This class appends an error message to the log file
    public class ErrorLogWriter {
         //JPanel jPanel2 = new JPanel();
         //Border border1;
         String logDirectory="c:/EMails/log/";
         File errFile; //= new File(errDir+"/"+"errorLog.dat");
         //The constructor initializes the errFile given the filename
         public ErrorLogWriter(String fileName) {
              errFile=new File(logDirectory+fileName);
              /*try {
                   jbInit();
              }catch(Exception e) {
                   e.printStackTrace();
         public void write(String writeStr){
              try {
                   //Creates directory if doesn't exist
                   File errDir = new File(logDirectory);
                   errDir.mkdirs() ;
                   //If the directory exists...
                   if(errDir.isDirectory()){
                        //File errFile = new File(errDir+"/"+"errorLog.dat");
                        byte[] lastContent=new byte[0];
                        //If there is already a file with this name: Read its content so it can be preserved
                        if (errFile.exists()){
                             FileInputStream fis=new FileInputStream(errFile);
                             //Read everything into the byte array
                             lastContent=new byte[fis.available()];
                             fis.read(lastContent);
                        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(errFile));
                        PrintWriter oos = new PrintWriter(bos);
                        String newWriteString=new String(lastContent);
                        writeStr.trim() ;
                        //Appends the new string to the old content
                        newWriteString+=writeStr;
                        newWriteString+="\n";
                        //writes everthing back to the file
                        oos.write(newWriteString) ;
                        oos.flush();
                        oos.close();
              }catch (Exception ex) {
                   ex.printStackTrace() ;
         public static void main(String[] args) {
              ErrorLogWriter log = new ErrorLogWriter("logerror.log");
              log.write("Hello Log!") ;
    All these file are in one package called SunMail and i run this in jbuilder in 4.0 ,I get the following error
    eFile is not created
    java.lang.ClassCastException: javax.mail.internet.MimeMultipart
         at MoveMessageTo.<init>(MoveMessageTo.java:26)
         at SunMailConnection.run(SunMailConnection.java:86)
         at SunMailConnection.start(SunMailConnection.java:118)
         at SunMailConnection.<init>(SunMailConnection.java:21)
         at SunMailConnection.main(SunMailConnection.java:133)
    I know the it would be difficult if anyone could help me out it would be a great favour !!!
    pls help me out of this !!!!

  • How I can send emails using the client object model?

    I have tried this, but I always get an exception with error message "A recipient must be specified.":
    string webUrl = "http://sharepoint.example.com/";
    EmailProperties properties = new EmailProperties();
    properties.To = new string[] { "[email protected]" };
    properties.Subject = "Test subject";
    properties.Body = "Test body";
    ClientContext context = new ClientContext(webUrl);
    Utility.SendEmail(context, properties);
    context.ExecuteQuery(); // ServerException thrown here
    context.Dispose();
    Server stack trace:
    at System.Net.Mail.SmtpClient.Send(MailMessage message)
    at Microsoft.SharePoint.Utilities.SPUtility.SendEmail_Client(EmailProperties properties)
    at Microsoft.SharePoint.ServerStub.Utilities.SPUtilityServerStub.InvokeStaticMethod(String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)
    at Microsoft.SharePoint.Client.ServerStub.InvokeStaticMethodWithMonitoredScope(String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)
    at Microsoft.SharePoint.Client.ClientMethodsProcessor.InvokeStaticMethod(String typeId, String methodName, XmlNodeList xmlargs, Boolean& isVoid)
    at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStaticMethod(XmlElement xe)
    at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessOne(XmlElement xe)
    at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStatements(XmlNode xe)
    at Microsoft.SharePoint.Client.ClientMethodsProcessor.Process()
    msdn link: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.utilities.utility.sendemail.aspx

    hi
    if you will check the code of SendEmail_Client(EmailProperties properties), you will find that it may only send emails to internal users. May be it was made intentionally in order to prevent spamming from client code. So let's see:
    internal static void SendEmail_Client(EmailProperties properties)
    if (properties.To.Count == 0)
    throw new SPException(SPResource.GetString(web.LanguageCulture, "SendEmailInvalidRecipients", new object[0]));
    AddressReader func = null;
    using (MailMessage mm = new MailMessage())
    func = delegate (MailAddress a) {
    mm.To.Add(a);
    ResolveAddressesForEmail(web, properties.To, func);
    new SmtpClient(SPAdministrationWebApplication.Local.OutboundMailServiceInstance.Server.Address).Send(mm);
    I.e. it adds recipient in ResolveAddressesForEmail() method. Now let's check this method:
    private static void ResolveAddressesForEmail(SPWeb web, IEnumerable<string> addresses, AddressReader func)
    if (addresses != null)
    foreach (string str in addresses)
    if (string.IsNullOrEmpty(str))
    continue;
    SPPrincipalInfo info = ResolvePrincipal(web, str, SPPrincipalType.All, SPPrincipalSource.All, null, false);
    if ((info != null) && (info.PrincipalId > 0))
    if (!string.IsNullOrEmpty(info.Email))
    try
    func(new MailAddress(info.Email, (info.DisplayName != null) ? info.DisplayName : "", Encoding.UTF8));
    catch (FormatException)
    continue;
    if ((string.IsNullOrEmpty(info.Email) && info.IsSharePointGroup) && web.DoesUserHavePermissions(SPBasePermissions.BrowseUserInfo))
    SPGroup byNameNoThrow = web.SiteGroups.GetByNameNoThrow(info.LoginName);
    if (byNameNoThrow == null)
    continue;
    foreach (SPUser user in byNameNoThrow.Users)
    if (!string.IsNullOrEmpty(user.Email))
    try
    func(new MailAddress(user.Email, (user.Name != null) ? user.Name : "", Encoding.UTF8));
    continue;
    catch (FormatException)
    continue;
    continue;
    I.e. at first it tries to resolve user using ResolvePrincipal() method. If it is not resolved (info == null) email is not sent. But if it is - it first checks that email is not empty. If it is not - it adds email to the MailMessage.To recipients list. If
    it is empty it checks whether the principal info represents Sharepoint group. If yes - it will send email to each member of the group.
    So it may be so that you try to send email to external user (which is not supported according to the code above), or resolved principal doesn't have email specified.
    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com

  • How Do I Increase The Speed Of Sending Emails Using The Mail Service on my Mac Mini Server?

    Note: This is the first time I have set up a mail server.
    I have a Ruby on Rails application where I am currently sending approx. 240 individual emails with the potential of more being sent each week as more people add themselves to our mailing list.  I am sending them invidually in order to personalize the emails and to hopefully prevent my emails being falsely identified as spam.
    The GoDaddy email address I was using in my Rails application has a daily limit of sending 250 emails each day.  With our mailing list fastly approaching 250 I decided to set up an email address on my Mac Mini Server using Mountain Lion (OS X Server).  The email address was set up to be stored locally at the advice of Apple Enterprise Support.  This email address will not be used in an email program.  It will only be used in all my Rails applications.
    My emails send properly but take almost 10 seconds an email.  When I use the same software with GoDaddy's email address the emails take about eight minutes to send.  With the email address I created it takes about 41 minutes.  The difference seems to have to do with the sacl_check being done.  Here is an example of what I see for each email in mail.log.
    Mar 14 11:06:50 hostname.domain1.com postfix/qmgr[45322]: 4B2C5603D25: removed
    Mar 14 11:06:59 hostname.domain1.com postfix/smtpd[99464]: sacl_check: mbr_user_name_to_uuid([email protected]) failed: No such file or directory
    There is 9-10 seconds that elapses when the sacl_check.  If I subtract this difference the remaining time is almost the time that the GoDaddy email takes to send the same number of emails.
    The link below is a post about the sacl_check.  I was looking at the comments by powercore from Germany at the comments where settings in /etc/postfix/main.cf are discussed.
    https://discussions.apple.com/thread/3241121?start=0&tstart=0
    Will making these setting changes speed up the sending of the emails from my Mail Server or is there something else I can check?

    http://en.wikipedia.org/wiki/Intel_Quick_Sync_Video
    OS X [edit]
    Apple added Quick Sync support in OS X Mountain Lion for AirPlay Mirroring and QuickTime X.[9]

  • API to Fetch email using SMTP from EXCHANGE server.

    Hi There,
    We have a customer requirement to fetch e-mails from his EXCHANGE server using SMTP. Our application currently supports fetching e-mail using POP, IMAP.
    POP and IMAP is disabled in customer environment and there is no way enable them to fetch e-mails.
    Please help me to solve this problem by pointing to some APIs available or code.
    I searched but not able to find a solution for this.
    Thanks in advance.
    Regards,
    Krish.

    SMTP is generally, almost strictly used for sending mail not fetching.
    I understand that they may not be able to use IMAP or POP, as some rented Exchange services block IMAP,POP services so they can ensure the client is sticking to the Exchange product line etc.
    Perhaps you could find a Exchange library for Java? im sure there is one about. There are OpenSource solutions for exchange out there as Linux applications like evolution can communicate with Exchange. I beilve the protocol used in Exchange is MAPI? (or SAPI?)
    Another solution would be to just use the clients mail client to export the emails to a more portable format (MBOX? or a folder of EMS files) then import them into Java using InputStreams on the files?
    Or, Get an opensource Exchange compatible server software, eGroupware springs to mind, set that up as a proxy or a go-between. set it up to retrieve mail from the Exchange server and enable its POP and IMAP functions and retrieve the mail from it.
    Either way Im near 100% certain SMTP is not for fetching mail.

  • Receive Original Email Whenever I Reply to an Email Using Microsoft Outlook Exchange Server

    This is a problem I've seen other people post about, but I haven't found a solution.  Whenever I reply to an email using Microsoft Outlook 2007 with Exchange Server on my computer, I receive a copy of the original email (not the reply, but the original email that I replied to) on my Curve.  My BB email is set up with BIS and my carrier is Verizon, but I've seen people post about this with other carriers.
    Apparently there is some kind of incompatibility between Microsoft Exchange Server and BIS that is causing this problem.
    This is a huge pain, because everytime I reply to an email, I have to delete a copy of the original email on my blackberry. 
    Does anyone know the solution to this?

    Under "tools", "Options" , "applications" on my computer there isn't a "mailto". so these instructions don't work. Any other ideas?

  • Exchange Email using the wrong username by default

    Hi, I recently setup our new imac for the family to use. One log in (my name) and then i set up my wifes hotmail on the same login. After the kids took over and had all their stuff we changed to multi user logins. On my login I deleted my wifes hotmail and replaced with my hotmail and also my exchange email however it would not connect as it defaults everytime back to my wifes name and not mine. I change it and then restart to see if it will hold but it doesn't. getting frustrated. Any suggestions would be appreciated.
    Thanks

    When posting in Apple Communties/Forums/Message Boards.......It would help us to know which iMac model you have, which OS & version you're using, how much RAM, etc. You can have this info displayed on the bottom of every post by completing your system profile and filling in the information asked for.
    CLICKY CLICK-----> Help us to help you on these forums
    ***This will help in providing you with the proper and/or correct solutions.***
    =================
    If your problem is w/Hotmail, you need to contact their tech support and/or post in their forum.

  • Rule to avoid sending email to the wrong recipient based on content

    Hi guys,
    My customer has had bad experience with the auto-complete feature in Outlook in the past, and now that he's getting Office 365 Enterprise, he wants to know if there is a way to block any outgoing mail intended for another company. We would be detecting the
    destination companies based on 1) company name mentioned somewhere in the email message and 2) company domain specified in the To, Cc and Bcc fields. Example:
    I write an email containing confidential information for John Smith from Contoso with the word "Contoso" used at some point in the email body. When I start typing the recipient's address, I inadvertently select another John Smith, this guy from
    Fabricam. If I click SEND, Fabricam will have sensitive information intended for Contoso.
    Hell breaks loose.
    So the solution comes from either Outlook (proactively via a mail-tip) or Exchange (in the background as a transport rule or DLP policy) stopping this from happening, but I can't for the life of me find how to create a rule that checks for a string of text
    in the body or subject and compares that to the recipient domain. If a match is found, the email should leave the org just as usual. If one is not found, the email should be either blocked, sent to a manager for approval, or the user warned.
    Oh, and the customer will primarily be using EOP1 or E1 plans, so I can't rely on DLP because that's on the EOP2 plans and our company doesn't offer them.
    ¿Has anybody pulled one of these off in the past? It seems like such a simple scenario yet it doesn't seem straightforward enough.
    Thanks!

    Hi Gregory,
    i do believe your best bet would still be DLP, but i just check on one of our EOP1 customers and there is a possibility to create a Rule (under Mailflow in Exchange admin) that checks on subject and body contents. Hopefully that will allow you to create
    the setup you need.
    Kind regards, Philipp - Solid IT Solutions

  • HT1668 I cannot remove the draft write mail template from the mail application screen. Save draft works but cancel does not remove the draft template. I can send email using the template but it remains on screen preventing me from accessing any mail

    Still can't get rid of the template page

    I am not at all sure about what you are calling a draft email template. I have never seen one in the mail app and unless this is something that you created in Pages or some other word processing program I don't know what template you are describing.
    Anyway, this may work. Quit the mail app and them go back and see if the draft is still on the screen.
    Quit the app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your 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 of the app that you want to close. Tap the home button or anywhere above the task bar.
    Or try this.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons

  • We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is: Cannot send mail. The user name or password for iCloud is incorrect.

    We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is:>> Cannot send mail. The user name or password for iCloud is incorrect.

    About ~20 hours later, this ended up solving itself. We can send email using the '.icloud' email from both the iPad and iPhone.  Advise would be 'wait' before you start seeking alteranatives like yahoo, hotmail, etc.  This definitely is a convenient way to keep all your 'cloud' information in a centralized place, including the common email...

  • How to delete a "sending" email on the the iphone

    While up in Canada, I couldn't send emails even when I added the Shaw Cable outgoing smtp server. Shaw support said it is a problem with the iphones. They may be correct, since I could send outgoing using the same smtp server on an imac and macbook using mail with that smtp server. Incoming email was ok. So, I had attempted to send 3 emails, and for 3 days each time I woke up may iphone, it attempts to send, but can't. No outgoing email box to open and delete these messages!
    Crossed the Canada/Washington State border, and two of the emails sent fine (puzzled recipients, getting them 3 days late). Four days later my iphone keeps trying to send one last email, no success. Otherwise, everything back to normal, sending and receiving email in two .mac accounts, and two separate non-mac accounts. My battery is being drained by the constant attempt to send this remaining email. Unlike Mail on the Mac, the iphone has no place that I can find where I can delete this pending email. It's in purgatory! Tried reboot, etc. Any advice?

    That took care of it. A pain, however.
    Thanks for the advice.
    Daniel

Maybe you are looking for

  • Editing (cut/paste/move) more than one track at a time

    i'm new to mac/garageband and everything is going great so far. i'm currently using my fostex hardisc recorder to record basic tracks and then dumping them into my imac as wave files. i'm currently trying to edit a drum track that requires editing al

  • Problem in consuming a WSDL of ME in MII

    Hi Experts, I am trying to consume a ME data in MII by using ME standard webservice.Its working fine in SOUP UI 4.0.0.But same url m trying to give MII webservice action block.its returning nothing. I am trying to pass Item,Revision,Site and I want t

  • Unsupported media or damage file message when trying to import ProRes LT from Ninja

    Hi There, Is my first day of migration from FCP to Premiere Pro CS5.5. I'm tryiing to import ProRes LT 1920x1080 @ 29.97fps recorded with an Atomos Ninja device and Premiere gives me the message: "Unsupported media or damage file" and doesn't open it

  • Specifying a Linked Server as parameter/environment in a 2012 SSIS project

    I have a server that will hold the 2012 SSIS projects which I want to run against the AlwaysOn Listener. How do I to specify the linked server in a parameter? If I just use a server parameter that matches the Linked Server name will that work? Just t

  • BBP_Start - forgot Password link needs a user

    Hi there, I've got just a short question. Everytime when I click on the link <forgot user or password? help!> The service needs a user to acces the next page. Can I customize a general user for this? And if so, where do I have to make these settings.