We have a web application that links to an exchange account and shows a list of all emails relating to that specific customer. When you click on an email in the list then that specific email opens in a new window in OWA.
We have just been upgraded to Exchange 2010 and I was pleased to find that all this code needed to be rewritten as WebDav has been deprecated! I've got everything working so far except opening the email. This is an example of the URL I get when opening one manually:
https://owa.example.com/owa/?ae=Item&a=Open&t=IPM.Note&id=RgAAAADmf6EZfqbORr1%2fiveFFYyBBwDf6W1FdO8tR59JIuH4tblWAAABcKsWAAAT7QzqtNGiR6C1Ogbnj0IjAAAAA050AAAA&pspid=_1328545178425_761458089
The problem is that I don't know how to get the last parameter (pspid). Does anyone know what this is? I'm starting to think it might be a security token for the session as opposed to part of the email. Does anyone know know the best way to generate a link like this?
Thanks
It took about a day to find the answer so I hope this helps someone. I needed to convert to the OwaId.
//Get the OWA Id
public String GetOutlookOwaId(EmailMessage message, ExchangeService ser)
{
AlternateId ewsId = new AlternateId(IdFormat.EwsId, message.Id.ToString(), "person#example.com");
AlternateIdBase owaId = ser.ConvertId(ewsId, IdFormat.OwaId);
return ((AlternateId)owaId).UniqueId;
}
Related
Long shot, but I'd like to fiddle with ViaGogo API (C# library more precisely). ViaGogo has a well documented public API, documentation is avaliable here.
Problem is, you need to authenticated as it usually happens with this kind of APIs: usually, you find a section of the website, maybe in your profile section, where you can obtain keys, secrets and so on (this happens for example on Facebook or Amazon).
As for ViaGogo, I only found a link that points to a Google Form: this form asks for info about advertising and affiliation on a complete different level of what I need, I won't publish anything read via API. Furthermore, there's no field to leave an e-mail address.
Their C# library seems pretty popular as far as I can tell from downloads from NuGet; I wonder how all these thousands of devs succesfully called that API.
Has anyone succesfully obtained authentication info from ViaGogo?
According to note in registration form, you have to wait for 30 days for their reply.
For more help you can contact them on following contacts:
E-mail: affiliate#viagogo.com
Telephone: +442075532777
Or
http://www.viagogo.com/in/help
There doesn't seem to be any way around this registration according to their website and the api itself -- an appID and password is required. You may try your luck emailing them at Affiliate.Team#viagogo.com -- see this issue on github where the possibility of getting an account via email is discussed: https://github.com/viagogo/developer.viagogo.net/issues/24
i am creating a URL link to directly open Outlook's compose email page where all the email will be populated as soon as the page appears but the problem is when i enter the below URL
https://snt149.mail.live.com/?page=Compose&to=test1#gmail.com&cc=test2#gmail.com&BCC=test3#gmail.com
all the fields get filled up except the BCC one. Can anyone tell me where i am going wrong? Any piece of suggestion will be appreciated.
this works fine with Outlook as Email application. In my case it's tested with 2010 Outlook version. You are hard coded to web email which does not make so much sense, does it??
abcd#gmail.com
edit:
I cannot include a working test link here, probably due to HTML restrictions of SO
I have come into ownership of a ASP.NET MVC site that utilizes Biztalk 2013 to handle tasks like sending emails. I am completely new to biztalk so forgive obvious mistakes in this post.
Quick overview
The service is called through the application and then the orchestration calls a stored procedure in a sql db to populate some of values for the email (including html for the email) and then sends the email out.
I now want to add a pdf attachment to the email.
As a test, I added a pdf file to the server and then I have tried adding ActualEmailMsg(SMTP.Attachments) = "C:\\PDFs\\test.pdf";
ActualEmailMsg(SMTP.MessagePartsAttachments) = 2; to the message assignment expression shape as suggested in this post to no avail. (I also tried the physical path with only 1 "\" like "C:\\PDFs\test.pdf" and that didn't work)
I have ruled out the possibility of a lack of permissions from the service account to the PDF folder. The email sends correctly but no attachment is present. I am getting no errors in the code or in the event viewer on the server so at this point I am at a loss for what it might be.
After lots of googling I found the issue was related to the send pipeline. This thread got me on the right track.
In the send ports section of the BizTalk Admin Console of the app, the send pipeline was using a custom pipeline I believe was made by the previous owner. I changed it to the 'Pass Thru Transmit' type in the dropdown and it is now working.
I use the following pattern for sending Emails. I’m not sure but maybe you need to use the ActualEmailMsg(MIME.FileName) attribute for message in email.
ActualEmailMsg(MIME.FileName) ="Report_{"+FullFileName+"}.xml";
ActualEmailMsg(SMTP.CC)=ReportNotificationEmailAddress;
ActualEmailMsg(SMTP.Subject)="Report Notification Email";
ActualEmailMsg(SMTP.EmailBodyFile)=#"C:\...\ReportNotificationBody.htm";
ActualEmailMsg(SMTP.Attachments)=#"C:\..\ReportNotificationBody.png”;
ActualEmailMsg (SMTP.EmailBodyTextCharset)="UTF-8";
I'm working on custom UI for company's directory based on Lync. Using Lync 2013 I execute this search:
Container.Instance.Lync.ContactManager.BeginSearch(SearchQuery,
SearchProviders.GlobalAddressList,
SearchFields.AllFields,
SearchOptions.IncludeContactsWithoutSipOrTelUri,
500,
ContactsAndGroupsCallback, SearchQuery);
For each of matching contacts I try to access their endpoints to display phone number:
var cit = ContactInformationType.ContactEndpoints;
var endpoints = contact.GetContactInformation(cit) as List<object>;
Problem
If found contact is in the contact list of account I'm using to connect Lync, then I get access to full details (5 endpoints). However if he is not in contact list, I get access to only 1 endpoint.
Any ideas why is it happening like that? Is there a global privacy setting I need to turn off or something?
How can I get access to all endpoints at all times?
Thank you.
PS: I tried to load each contact in the result set individually and still get the same behavior.
I encountered a similar problem when trying to write a program to obtain the status of all users on Lync SDK 2010. Chose all users and read it's status (online / offline etc.). But it's working out well with only those contacts that were in the list of client contacts. I do not know why, but the solutions are not found.A little later I use UCMA 4 (with Application endpoint), though the list received from AD and only able to get the current status.
Maybe it makes sense to use the search by AD? Find phone number by user sip? If so, try to use this filter for DirectorySearcher:
searcher.Filter = "(&(objectClass=user)(msRTCSIP-PrimaryUserAddress=*))"; //put sip instead of *
P.S. what sdk are you using?
Answer from Microsoft Support:
The behavior you are seeing is due to presence subscription optimization to the Lync client so that the subscription is delayed until the necessary contact information is required by the Lync client. Photo is an example for this optimization. Another example is ContactEndpoints. Please take a look at Contact presence subscription changes section of the Migration doc for Lync 2013 page in MSDN docs.
Specifically you must create and maintain your own ContactSubscription for the contacts that you need all the ContactEndpoints.
I have been facing the same issue. You can try loading the person's ContactCard before calling the GetContactInformation function explicitly
Microsoft.Lync.Controls.ContactCard objContactCard = new Microsoft.Lync.Controls.ContactCard();
objContactCard.Source=objContact.GetContactInformation(ContactInformationType.EmailAddresses);
ContactSubscription _contactSubscription = lyncObj.ContactManager.CreateSubscription();
_contactSubscription.AddContact(foundContact);
_contactSubscription.Subscribe(ContactSubscriptionRefreshRate.High, _ContactInformationList);
However, you still might get some delay in getting the information (phone numbers). You can choose to use Thread.Sleep or might just want to retry.
Hope this helps.
Problematic is relying on contact information even for the lync client user. In our solution we are doing something like this:
Contact user = LyncClient.GetClient().Self.Contact;
string email = user.GetContactInformation(ContactInformationType.PrimaryEmailAddress) as string;
I would expect that the current lync user contact always is filled properly. And if it wasn't, I'd expect the code to throw an exception or at least return null or an empty string.
Instead it sometimes returns the sip-uri of the contact without the leading "sip:" prefix. Oddly enough this is not always reproducable: Most of the time the code above returns the primary email address (according to active directory) correctly, sometimes it behaves as mentioned above.
Well, for my program(s) I'd like to let the user send me an e-mail with any errors. Instead of relying on a forsaken SMTP server, I decided to let the user use his very own e-mail client to send an e-mail to a specified address.
So what I need is:
A sender (should not be changeable) (example: mysupportemail#gmail.com)
An attached file (should not be changeable) (example: "C:\a file.log")
(Optional) A body (changeable)
I hope it is possible!
You can use the mailto command for this. See http://msdn.microsoft.com/en-us/library/aa767737(VS.85).aspx for more information. Some mail clients support attachments on this. See the comments of the MSDN page for some information on this.
The mailto protocol has limitations, such as not being able to specify an attachment (some mail clients support it, but it's not in the official protocol). Your best option is probably to use the MAPISendMail function to let MAPI do the hard work. See this article for details:
Sending files via the default e-mail client
I used this technique in the past, it seems to work perfectly.
Using mailto directly from you application cause potential problems. If you have specified mail account for receive e-mails you can be sure, that someone will use it somehow to sent you spam or thousands unwanted emails. In our company we struggled with this problem many times - at last, we decided to allow our customers to report problems in any other way - web page form.
Now, when customer click 'report problem' this option displays a form for reporting bugs in default web browser. Opened link include some additional information which causing partial fill of the form opened by customer. Now, we have an intermediate layer and absolute control on server side who report problem (ip) and we can limit reporting for specified users. Next advantage of these solution is that you can forward emails to different departments depending on what form fields are marked/filled with.
Well, I have found the perfect solution!
For those who want to see it...
http://social.msdn.microsoft.com/Forums/en/netfxnetcom/thread/a75533eb-131b-4ff3-a3b2-b6df87c25cc8
http://www.eggheadcafe.com/community/aspnet/2/10019665/email-through-gmail-in-c.aspx