Le Café Central de Deva
... Deva blogs!!
I changed the way of blogging. Re-designed the site & started using the latest Windows Live Writer 2011!! Additionally added Microsoft Translator gadget available @ top of page, so that you can change the page in your preferred language!!
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.
A zoom.it version of the poster can be found at http://zoom.it/BuoF.
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:
/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)
3: string PR_SMTP_ADDRESS = @"http://schemas.microsoft.com/mapi/proptag/0x39FE001E";
4: if (mail.SenderEmailType == "EX")
6: Outlook.AddressEntry sender =
8: if (sender != null)
10: //Now we have an AddressEntry representing the Sender
11: if (sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry
12: || sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry)
14: //Use the ExchangeUser object PrimarySMTPAddress
15: Outlook.ExchangeUser exchUser = sender.GetExchangeUser();
16: if (exchUser != null)
18: return exchUser.PrimarySmtpAddress;
22: return null;
27: return sender.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS) as string;
32: return null;
37: return mail.SenderEmailAddress;
This will help you to move ahead and get the correct SMTP address:
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:
Const cdoSendUsingPort = 2
If wscript.arguments.count <> 3 Then
wscript.echo "Arguments must be: <smtp server> <sender address> <recipient address>"
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
.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
' build HTML for message body
strHTML = "<HTML><BODY>" &_
"<b>This is the test HTML message body</b></br>" &_
' apply the settings to the message
Set .Configuration = iConf
.To = strTo
.From = StrFrom
.Subject = "This is a test CDO message (Sent via Port 25)"
.HTMLBody = strHTML
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
1: CDO.Message.1 error '80040213'
3: The transport failed to connect to the server.