Le Café Central de
Deva             


                    ... Deva blogs!!



  • Le Café Central de DeVa

    Download: Exchange Server 2013 Architecture

    • 0 Comments

    Now you can download the Microsoft Exchange Serve 2013 Architecture in .PDF format. This poster highlights the significantly updated and modernized architecture in Exchange 2013, and highlights the new technologies in Exchange 2013, such as Managed Availability, the new storage and high availability features, and integration with SharePoint and Lync.  In addition, it illustrates the new transport architecture in Exchange 2013

    Exchange Server 2013 Architecture

    A zoom.it version of the poster can be found at http://zoom.it/BuoF.

  • Le Café Central de DeVa

    Microsoft Office 2010 SP2 available for download

    • 0 Comments
    Now you can download Office 2010 SP2 which provides the latest updates for Office 2010. This service pack includes two kinds of fixes: (1) Previously unreleased fixes that are included in this service pack. In addition to general product fixes, these fixes include improvements in stability, performance, and security. (2) All the public updates that were released through May 2013, and all the cumulative updates that were released through April 2013.

    DownloadEither you can install this via Microsoft Update (recommended one) or download Office 201 SP2 32-bit or Office 201 SP2 64-bit package. For more info you can refer, http://support.microsoft.com/kb/2687455

    .

  • Le Café Central de DeVa

    Outlook Programming : How to get the SMTP Address of the Sender of a Mail Item using Outlook Object Model?

    • 1 Comments

    Recently I was assisting an developer who used Outlook Object Model (OOM) API and tried to get the SMTP address of the Sender of a given mail item.

    In order to get the values, he first made the following OOM call – it worked fine for him for couple of mail items, but fails to get the SMTP value as given below:

       1: mailItem.Recipients[i].Address 
    It returned the value as,
    /O=MFC2013/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=B370134F8FFD4CF3A0023F27B6B61F7D-ADMINISTRATOR

    In this scenario, to determine the SMTP address for a mail item, you can use the SenderEmailAddress property of the MailItem object. However, if the sender is internal to your organization, SenderEmailAddress does not return an SMTP address, and you must use the PropertyAccessor object to return the sender’s SMTP address (adding the related C#.Net code for your reference).

       1: private string GetSMTPAddress(Outlook.MailItem mail)
       2: {
       3:     string PR_SMTP_ADDRESS = @"http://schemas.microsoft.com/mapi/proptag/0x39FE001E";
       4:     if (mail.SenderEmailType == "EX")
       5:     {
       6:         Outlook.AddressEntry sender =
       7:             mail.Sender;
       8:         if (sender != null)
       9:         {
      10:             //Now we have an AddressEntry representing the Sender
      11:             if (sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry
      12:                 || sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry)
      13:             {
      14:                 //Use the ExchangeUser object PrimarySMTPAddress
      15:                 Outlook.ExchangeUser exchUser = sender.GetExchangeUser();
      16:                 if (exchUser != null)
      17:                 {
      18:                     return exchUser.PrimarySmtpAddress;
      19:                 }
      20:                 else
      21:                 {
      22:                     return null;
      23:                 }
      24:             }
      25:             else
      26:             {
      27:                 return sender.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS) as string;
      28:             }
      29:         }
      30:         else
      31:         {
      32:             return null;
      33:         }
      34:     }
      35:     else
      36:     {
      37:         return mail.SenderEmailAddress;
      38:     }
      39: }

    This will help you to move ahead and get the correct SMTP address:

    Output

    Happy Programming!!

  • Le Café Central de DeVa

    Custom CDO app throws error CDO_E_FAILED_TO_CONNECT

    • 0 Comments

    Recently I was working with a customer (at his Windows XP) where his CDO app (CDOSEND.vbs – given below) is failing to send email and throws the error “CDO_E_FAILED_TO_CONNECT” (you can refer the below given Output also). We tried setting CONFIG parameters like user name, SLL, password – but it doesn’t help.

    Code Snippet:

    Option explicit
     
    Dim iMsg
    Dim iConf
    Dim Flds
    Dim strHTML
    Dim strSmartHost
    Dim strFrom
    Dim strTo
     
    Const cdoSendUsingPort = 2
     
    If wscript.arguments.count <> 3 Then
       wscript.echo "Arguments must be: <smtp server> <sender address> <recipient address>"
    Else
     
     strSmartHost = trim(wscript.arguments(0))
     strFrom = trim(wscript.arguments(1))
     strTo = trim(wscript.arguments(2))
     
     set iMsg = CreateObject("CDO.Message")
     set iConf = CreateObject("CDO.Configuration")
     
     Set Flds = iConf.Fields
     
     ' set the CDOSYS configuration fields to use port 25 on the SMTP server
     
     With Flds
     .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
     .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
     .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
     .Update
     End With
     
     ' build HTML for message body
     strHTML = "<HTML><BODY>" &_
     "<b>This is the test HTML message body</b></br>" &_
     "</BODY></HTML>"
     
     ' apply the settings to the message
     With iMsg
     Set .Configuration = iConf
     .To = strTo
     .From = StrFrom
     .Subject = "This is a test CDO message (Sent via Port 25)"
     .HTMLBody = strHTML
     .Send
     End With
     
     ' cleanup of variables
     Set iMsg = Nothing
     Set iConf = Nothing
     Set Flds = Nothing
     
    End If

    Output:

       1: CDO.Message.1 error '80040213'
       2:  
       3: The transport failed to connect to the server.
    They were sending the mail using Port 25 and we made sure it’s not blocked by any AV solution. We tested sending mail using TELNET without any issues and collected NetMon logs for further analysis.
    When we investigated further, we noticed that the specific machine had Outlook Express installed and a specific account profile was configured for it. We just deleted the profile entry from it.

    Now we tried the above CDO app, it worked like a charm. Happy debugging!!

Page 1 of 1 (4 items)