[EWS][C#] Seding mail from Gmail using external SMTP server to map emails to corporate Exchange server (using EWS only)

I'm using my Gmail account as a aggregator for many email accounts and for sending using my customers SMTP servers.
Unfortunately one of my clients doesn't support sending emails from public internet by SMTP.
The only way to send emails is using their OWA or EWS and Gmail support SMTP only :-(
My idea is to customize any simple SMTP server in C# (ex.
http://www.lumisoft.ee/lswww/eng/products/mail_server/mail_index_eng.aspx?type=download) and add feature "SendMailByEWS"
I have working demo for sending simple mail, but this solution is not complex. There are many pitfalls, like mail with CC:,BCC, attachments, parsing raw email, etc.
Any ideas to simply solve this issue?
Thank you.

I have a similar problem. I have two Exchange email account:
1. Gmail (default)
2. Microsoft Exchange (work)
From my iPhone, I frequently email myself articles from other applications that I want to follow-up later. After upgrading to iOS7, when I type my Gmail ID in the 'To' field, the 'From' field automatially changes from my Gmail account to my work account. I didn't catch this the first few times this happened and was wondering what was going on as my emails started being sent from my work account.
Workaround for this case: Type in your To address first and then re-select the account to send From.
This is annoying and I hope Apple restores normal behavior.

Similar Messages

  • How can I move mail from Gmail to another account?

    Mail.app in Mavericks is incompatible with Gmail. I use Gmail. I have about 2GB of mail, most of it in a few dozen archive folders, stored on Gmail, and (I think) duplicated locally on my Mac Mini.
    I think my best recourse is to switch to an email service provider that conforms to the IMAP standard (which Gmail does not). Assuming I find one, I will have both accounts, Gmail and the new one, in Mail.app. How can I move the mail from Gmail to the other account?
    In Mail.app in Mavericks, All Mail must be marked to show as a folder, and when I move a message from a folder in Gmail it will still be in the All Mail folder.
    When all folders are empty, including the Inbox, can I be sure that every message has been moved to the new account, even though every message is still in the All Mail folder?

    Mail.app in Mavericks is incompatible with Gmail. I use Gmail. I have about 2GB of mail, most of it in a few dozen archive folders, stored on Gmail, and (I think) duplicated locally on my Mac Mini.
    --> mine's working fine. I know there are issues, but it should work
    I think my best recourse is to switch to an email service provider that conforms to the IMAP standard (which Gmail does not).
    --> yes, it would be nice if they adhered to standards.  That said, mine works great.  So far.
    Assuming I find one, I will have both accounts, Gmail and the new one, in Mail.app. How can I move the mail from Gmail to the other account?
    --> If all you want to do is keep your history, make a local folder on your mac and drag all the mail messages there (both se4nt and incoming).  I am not sure what will happen if you later drag those into the new Xmail account
    When all folders are empty, including the Inbox, can I be sure that every message has been moved to the new account, even though every message is still in the All Mail folder?
    --> Dont look in "all mail". Open your inbox and look at each individual inbox.
    Good luck,. But first, try to fix your account.
    Grant

  • Retrieve mail from Gmail account with pop3???

    I want to retrieve e-mail from my account on Gmail in my application, but I have a problem. I cant establishe a connection with pop3 server...
    Do you have an example (full) in Java code for retrieving a mail from Gmail account.
    I used the example from JavaMail Api 1,4 Specifications, but I have a problem with the parameters. (protocol null), and I dont know why...
    Help me, please...

    i hv retrived messages from gmail.but i m geting problem at the time ......
    when i m reading mail which hava attachment.........
    it is only showing attachment name...but not shoing the body part....
    this is my programe........
    plz any body help me its very urgent.........
    give me a programe how to find the attachment name with body part........
    //java msgshow -D -T pop3s -H pop.gmail.com -U user -P passwd
    package MailServer;
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.event.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.util.Date ;
    public class msgshow
    static String protocol;
    static String host = null;
    static String user = null;
    static String password = null;
    static String mbox = null;
    static String url = null;
    static int port = -1;
    static boolean verbose = false;
    static boolean debug = false;
    static boolean showStructure = false;
    static boolean showMessage = false;
    static boolean showAlert = false;
    static boolean saveAttachments = false;
    static int attnum = 1;
         static Message[] msgs = null;
         static String body = "";
         static String attachment = "";
         static String indentStr = " ";
    static int level = 0;
    static String from = "";
    static String subject = "";
    static Vector v ;
    public Vector v1;
    static Date date;
    public Vector show()
              int msgnum = -1;
              int optind;
              InputStream msgStream = System.in;
              v = new Vector();
    try
              // Get a Properties object
              Properties props = System.getProperties();
              // Get a Session object
              //debug = true;
              Session session = Session.getInstance(props, null);
              //session.setDebug(debug);
              // Get a Store object
              Store store = null;
              protocol = "pop3s";           
              store = session.getStore(protocol);
                   host = "imap.gmail.com";
                   user = "techzain";
                   password = "zain1234";
                   // Connect
              store.connect(host,port, user, password);
                   //System.out.println ("connected");
              // Open the Folder
              Folder folder = store.getDefaultFolder();
                   mbox = "INBOX";
              folder = folder.getFolder(mbox);
                   //System.out.println ("opened inbox");
              // 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);
              // Attributes & Flags for all messages ..
                   msgs = folder.getMessages();
                   //System.out.println (msgs.length);
                   for(int x=0;x<1;x++)
                   try
                        //System.out.println ("inside for");
                        Address[] addList=msgs[x].getFrom();
                             if(addList.length>0)
                                  from=((InternetAddress)addList[0]).getAddress();
                             subject=msgs[x].getSubject();
                             //body=(String)msgs[x].getContent();
                        date=msgs[x].getSentDate();
                        //body=(String)msgs[x].getContent();
                             //msgs[x].setFlag(Flags.Flag.SEEN,true);
                             if(msgs[x].isMimeType("multipart/*"))
                                  boolean bbb=msgs[x].isSet(Flags.Flag.SEEN);
                             System.out.println (bbb);
                                  Multipart multipart=(Multipart)msgs[x].getContent();
                                  for(int i=0,n=multipart.getCount();i<n;i++)
                                  {Part part=multipart.getBodyPart(i);
                                       if(i==0)
                                       body=part.getContent().toString();
                                       else
                                       //body=(String)msgs[x].getContent();
                                       attachment=part.getFileName();
                             else
                                  boolean bbb1=msgs[x].isSet(Flags.Flag.SEEN);
                             System.out.println (bbb1);
                                  body=(String)msgs[x].getContent();
                             //System.out.println ("ok");
                             if(attachment==null)
                                  try
                                       v.addElement(x);
                                       v.addElement(from);
                                       v.addElement(date);
                                       v.addElement(subject);
                                       v.addElement(body);
                                       //System.out.println (v.size());
                                  System.out.println("********* mail "+x+" ***********");
                                  System.out.println("From: "+from);
                                  System.out.println("Date: "+date);
                                  System.out.println("Sub: "+subject);
                                  System.out.println("body: "+body);
                                  System.out.println("Attachment: No attachments......");
                                  System.out.println ("*******************************\n\n");
                             catch (Exception ex)
                                  ex.printStackTrace();
                             else
                                  try{
                                  v.addElement(x);
                                  v.addElement(from);
                                  v.addElement(date);
                                  v.addElement(subject);
                                  v.addElement(body);
                                  v.addElement(attachment);
                                  System.out.println("********* mail "+x+" ***********");
                                  System.out.println("From: "+from);
                                  System.out.println("Date: "+date);
                                  System.out.println("Sub: "+subject);
                                  System.out.println("body: "+body);
                                  System.out.println("Attachment: "+attachment.toString());
                                  System.out.println ("*******************************\n\n");
                             catch(Exception ex1)
                                  ex1.printStackTrace();
                             //     System.out.println (v.size());
                   catch (Exception ex)
                        ex.printStackTrace();
              catch(Exception e)
                   e.printStackTrace();          
              System.out.println (v.size());
              return v;
         public static void main(String argv[])
         new msgshow().show();
              Flags flags = m.getFlags();
              StringBuffer sb = new StringBuffer();
              Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
              String s = "";
              for (int i = 0; i < sf.length; i++)
                   if (sf[i] == Flags.Flag.SEEN)
                        s = "\\Seen";
                        System.out.println ("Seen Message");
    */

  • How to import ALL MAIL from Gmail to OSX Mail?

    I am trying to migrate my mail system over to OSX Mail from Google Mail, but I can't seem to make "All Mail"  show up as an option in OSX Mail, even though I have the folder checked  in the Gmail settings to share with outside apps.  I am on Yosemite and a MacBookPro.
    How are others switching to OSX Mail from Gmail?
    Thanks for your help!
    Korky

    You open your email - edit - then select each email to delete.
    If you have an imap account you can delete it from the server and it will reflect on yoru phone.

  • Can't get any mail from Gmail to my mac

    help cant send or get mail from Gmail to my Mac?

    Try taking accounts offline
    then online
    mail/press the mailbox tab
    if that fails then delete account
    and re enter account details (set up account again)
    Gmail Help
    http://support.google.com/mail/?hl=en

  • Safari wpn't retreve mail from Gmail

    I have a problem. Safari will not retreve incomming mail from Gmail. The mail appears in the Gmail mail window but not in Safari. I get an error; Connection failed
    The server error encountered was your account is not enabled for POP access. Please visit your gmail settings page and enable your account for POP access
    I have very carefully followed the setup proceedure at the Gmail.com site. http://mail.google.com/support/bin/answer.py?answer=13275 Actually, I had my wife who is a programmer watch over my shoulder to double check. I can send email from Gmail but can not receive Right now I have two mail accounts, Comcast and Gmail. Should incomming messages from both accounts appeat in the same Safari window? If not where? I even went back to Gmail and checked my pass word.
    Thanks Bob

    Don't you mean that you can't seem to receive Gmail via Mail.app? If you can access your account in Safari, then there's nothing wrong with that, but if you can't retrieve via Mail after setting it up, that's something else.
    Are you sure you checked your Gmail settings? You need to enable POP access in Gmail before you can retrieve your mail via Mail.app
    Hope this helps,
    Mulder
    If my answer helped solve your problem, please consider awarding some points. Why Reward Points?
    iMac G4 700Mhz   Mac OS X (10.3.9)  

  • How to get next batch of mails from GMail?

    Hello,
    I can not get next batch of mail from Gmail. I thought how this is question for gmail but they have respond me this:
    "Thanks for your interest in Gmail and in Google. Because we're testing Gmail, there is some information we're unable to share."
    Does anyone can tell me how to do this?
    Thanks in advance!
    Best Regards,
    Nikola Putnik

    You cannot

  • Why yahoo/gmail retrieval and facebook app so so slow when in WIFI. But using the internet to check for emails and facebook is fast using the same WIFI connection??

    Why yahoo/gmail retrieval and facebook app so so slow when in WIFI. But using the internet to check for emails and facebook is fast using the same WIFI connection??

    Hi SandyS_VZW,
    Yes tried resetting the wifi connection and problem still persist.
    Here it is...to make it clear. Connected thru the same wifi at home...
    -> emails (yahoo/gmail) and facebook WEBSITES are working fine and fast when using/accessing thru a browser (chrome/samsung browser) - no problem with this.
    -> emails (yahoo/gmail) and facebook APP is soooooo sloooww (thru the App). Slow I mean comparing it to using their browser/websites... news feeds/emails refreshing so quickly but not when using the APP installed in Samsung Galaxy Note 4. Slow like - It will take around 5-10minutes just to get your emails and news feed refreshed.
    THIS HAPPENS ONLY WHEN CONNECTED THRU A WIFI which has a speed of 10-20mb. It is not happening when connected to the network data/plan.
    My wife has the same Samsung Galaxy Note 4 (coming from different provider at&t) - same setup (emails, fb app), same wifi connection, but she's not experiencing anything like it.
    Not sure why, I dont want to believe that while connected to a WIFI, Verizon is restricting anything and ******* me off to make me switch to my data plan connection everytime - which is Unfair!
    Was there a known issue similar about this case?
    thanks,

  • Is it possible to use External Defiantion in Interface Mapping?

    Hi Experts,
    Is it possible to use External defination in Interface mapping? I used this ED in Message Mapping but I am unable to use the same ED for Interface Mapping?
    In order to create Interface Mapping I need to create Message Interface and use it in Interface Mappiong?
    Thanks
    Rajeev

    Hi Rajeev,
         External definitions is for importing avaliable external DTD,XSD or WSDLs instead of creating them in XI environment maually by creating elements under datatypes,assigning them too Message types and Message Interfaces etc.Where as you fo for Imported Archives to import externally done Mapping programs like JAVA,ABAP and  XSLT mappings but not define Mesage interfaces.
    So you can create message interface import appropriate External definition into it.Later use it during interface mapping.Hope you understand it.
    Thanks,
    Ram.

  • Archive mail from Gmail

    I have purchased a new mac and in setting up mail my gmail account is constantly fetching archive mail from the server.  25000 messages.  I have searched and searched but can't find a way to stop it or change my archive settings.  In the mean time because it's constantly looking for emails I have gone through my months worth of data in 2 days!  Any advice please?

    Same here; right clicking and choosing "move to" is also an option, gives you more choiche.
    Updating Apple products used to be without much problems, but since Mavericks it seems that every update create a new problem!

  • Mail not receiving incoming mail from gmail account

    I have an imac with 10.5 that has suddenly stopped accepting email in one of my gmail accounts, but still gets it from another. I synched my imac with my ibook earlier today. The ibook has the same problem accepts mail from the account that the imac doesn't etc.
    Any help solving this problem would be greatly appreciated.
    dc

    Hi,
    Did you select “Directory Management Service” option, if so, please make sure you configure the Central Administration application pool identity account to have the Create, delete, and manage user accounts right to the container that you specify in Active Directory.
    Did you install Exchange server 2003 in your MOSS environment? If so, you should add an SMTP connector in Exchange Server, if you don’t know how to do that, you can post your issue into the following forum:
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdeploy/threads
    Also, please check whether your configuration meet the following requirements, If not, correct them and check the effect.
    ·         The application pool account for Central Administration, the logon account for the Windows SharePoint Services Timer service, and the application pool accounts for your Web applications should have the correct permissions to the e-mail drop folder.
    ·         The domain controller running Active Directory has a Mail Exchanger (MX) entry in DNS Manager for the mail server that you plan to use for incoming e-mail.
    For more information about how to configure incoming e-mail settings, please refer to the following article:
    Configure incoming e-mail settings
    http://technet.microsoft.com/en-us/library/cc262947.aspx
    Introduction to incoming e-mail
    http://office.microsoft.com/en-us/sharepointtechnology/HA100823061033.aspx
    Demo: Configure a SharePoint Server 2007 site to receive e-mail
    http://office.microsoft.com/en-us/sharepointserver/HA102047921033.aspx?pid=CH101788401033
    Enable and configure e-mail support for a list or library
    http://office.microsoft.com/en-us/sharepointtechnology/HA100823071033.aspx?pid=CH101215271033
    Rock  Wang 
    Rock Wang– MSFT

  • E-Mail won't send my mail from GMail account

    My e-mail keeps on telling me that it can't send e-mails from my GMail account and it's the primary account I use for sending e-mails. Please, tell me what do i have to do in order to be able to send e-mails from my Maill app on my iMac?
    photo: http://cl.ly/image/2j1s0h2d1H18

    The error message says that you don't have an outgoing mail server selected. Go to Mail > Preferences > Accounts and select the gmail account in the left hand panel. Next go to "Outgoing Mail Server" :
    It should read smtp.gmail.com if you are using pop. If it is blank click on it and it should display whatever outgoing servers you have configured. If the only option you have is to "Edit SMTP Server List" then you need to enter the information as shown below.
    These are the standard settings for gmail pop:
    You will also need to set password authentication on your outgoing (SMTP) mail as shown below:

  • How to get sent mail from Gmail server onto my mac

    I recently upgraded to Snow Leopard. When configuring Mail I used POP ( I prefer it) with my Gmail account and it tediously uploaded all my received mail from the Gmail server to my mac mail program. How do I get the sent mails on the Gmail server onto my computer?

    Not sure if this will work as I use IMAP. Go to Mail>Preferences>Accounts> click on mailbox behaviour, uncheck 'store sent messages on server' if it is checked. Then try a fetch mail and see if it works.

  • Mail did not download my sent mail from Gmail.

    Reposting this question in case I originally put it in the wrong category:
    Had a bit of trouble initially but eventually got my Mail account set up with my existing Gmail account and it nicely downloaded all my past incoming mail which is all in the In Box. However, I can't find my old outgoing mail. The only things I see when I click Sent are the messages sent since I started using Mail. Is there somewhere else I should be looking for them? If not, how do I go about importing them to my new computer now?
    The old outgoing messages are still on my old computer, but that email client is old Eudora— is there a way to import them from the old machine to the new and make them readable with Mail?

    Thank you for responding.
    >Can you visit the Gmail site and see if you can download them from there?
    Can you explain how would I go about doing that?
    As for JustAnswer, they wanted $58 to answer my question which is money I simply don't have.
    I saw the discussion you linked. He said "I figured out the solution to this problem.  I simply deactivated the email and reactivated it.  I guess after the updated to moutain lion that's all I needed to do."
    "Deactivated the email and reactivated" — do you understand what he means?
    I have done a Google search for this topic but no one seems to have this exact problem, and I've put a question up on the Google Gmail help forum with no response yet.
    Do you know how I might go about just undoing the connection I've made between Mail and Gmail so I could just start fresh and hope for a better outcome the second time?

  • Deleting E-mails from Gmail

    Hi,
    I have been using Mail App on my Mac for 4 months. Since then, all what I do when I need to delete an email, is simply to press back space, and it moves the email to Trash.
    Last week, I have noticed that all e-mails I have deleted are still available in All Mail. So when an Email is deleted, Mail App only removes the Label.
    Is there a way I can delete emails from Gmail using Mail on Mac?
    Thank a lot
    Best Regards,
    AMDeeb

    AMDeeb wrote:
    Thomas A Reed wrote:
    I guess the best solution is not to use Mail App.
    GMail's weirdness cannot be properly dealt with by any e-mail client I'm aware of.
    Microsoft Outlook on PC is compatible with Gmail's "Delete" thing.
    On Mac OSX, I found an alternative to Mail App that is fully compatible with GMail, which is Thunderbird.
    It is even compatible with staring emails as if you are in a web browser. Also, you can change the deleted items destination to you GMail's Trash Folder, which means that you can delete them from the server without logging from a browser.
    I hope using Thunderbird will be temperer, till Apple solve GMail issue either via software update (which i doubt), or via Mac OSX Lion.
    If you take the time to correctly setup Mail for GMail there is no functional difference between it and Thunderbird (as far as folder display/mapping), this is a user issue not Gmail and not MacMail.

Maybe you are looking for