I am using Exchange Web Services trying to find the Organizer of the meeting's email address
I have tried using
Appoint.Organizer.Address
but some of the properties are null (see image).
How do I get the email address of the organizer?
Link to image (sorry not enough rep to embed)
http://i.stack.imgur.com/wSv2r.png
What operation are you using ? If you have just used FindItems then that's what you would expected because only the displayName of the Sender (which is the Organizer) is returned with FindItems. To get the Address property populated you would need to do a GetItem (or Load in the Managed API).Or if you really want to save a call you could try using the PidTagSenderSmtpAddress extended property http://msdn.microsoft.com/en-us/library/office/jj713594(v=office.15).aspx
Cheers
Glen
Do you know how this meeting came into the mailbox? Was it sent from a sender outside of Exchange, or another mailbox in that Exchange organization? What version of Exchange? Also how are you binding to the appointment? It would be good to see that code. I've tried this with a few meetings here and they all have the Address property populated. Your screenshot shows a MailboxType field of "OneOff", and I'm not sure off the top of my head how to make that happen.
Typically "OneOff" refers to a recipient that couldn't be resolved. In this case, you might try taking the information that is present (in this case the display name) and calling ResolveName to see if you can get the address that way.
Related
I have been getting the sender's email address in Outlook using the RDOMail.SenderEmailAddress property, but I have recently realised that under some cases for SMTP or IMAP email accounts, that this property is null occasionally, right after the email arrives the inbox.
There's a rather convoluted way to get the sender's email address using the Outlook Interop Library: https://msdn.microsoft.com/library/office/ff184624.aspx
However, this does not work with the Redemption RDOMail object because the RDOAddressEntry interface lacks the AddressEntryUserType and the GetExchangeUser method.
The documentation of the RDOAddressEntry object says the following about the SMTPAddress property:
String, read-only. Returns the SMTP address of the given user. If the
address type is "SMTP", the returned value is the same as that
returned by the Address property. If the address type is "EX",
Redemption tries to retrieve the PR_SMTP_ADDRESS property, if
unsuccessful, it retrieves the default SMTP address from the
PR_EMS_AB_PROXY_ADDRESSES Extended MAPI property.
Looks like it might be a more reliable way to get the sender's address if I do this in my method:
if (rdoMail.SenderEmailAddress != null) return rdoMail.SenderEmailAddress;
if (rdoMail.Sender != null) return rdoMail.Sender.SMTPAddress;
return null;
Since I don't have a reliable way to test my theory, I'm seeking help here to see if anyone has more experience in dealing with this problem.
Thanks in advance.
I cannot image why SenderEmailAddress would be null, unless you have a partially downloaded item (IMAP4 specific). There is no reason to have AddressEntryUserType or GetExchangeUser method - all you need is the address type - if it is "EX", you have a GAL user, otherwise an SMTP address.
To get the sender SMTP address, check the SenderEmailType property. If it is anything but "EX", just use the SenderEmailAddress property. If it is "EX", read the PidTagSenderSmtpAddress property using RDOMail.Fields["http://schemas.microsoft.com/mapi/proptag/0x5D01001F"]. If you get back null, check if RDOMail.Sender is not null and read the RDOMail.Sender.SMTPAddress property.
I am attempting to set a different return path and sender in the headers to replicate a previous PHP system. It needs to be exactly the same.
When I put in a Sender it sets this to the return path and I can't seem to find a solution to separate these. Also the sender shows as behalf of in the From part of the mail message which I do not want.
Any recommendations?
Use:
MailMessage mail = new MailMessage("sender#email.com", "to#email.com");
mail.ReplyToList.Add(new MailAddress("reply#email.com", "reply-to"));
Please note MailMessage.ReplyTo is now obsolete.
Documentation
Have a look at the MailMessage.ReplyTo property.
Use the ReplyTo property to indicate an address other than the From address to use to reply to this message.
I used the MailKit library to solve my issue.
This allows you to specify a different sender at server level
I downloaded and setup the example,I uncommented the following in the code.
static public string[] SCOPES = { PlusService.Scope.PlusLogin, PlusService.Scope.UserinfoEmail };
It retrieves my name, friend etc but it does not retrieve my email address.
Is anyone able to assist? Possibly i'm looking in the incorrect place.
I used tested it using Try It. I tested it with all of the different scopes
https://www.googleapis.com/auth/plus.login Know your basic profile
info and list of people in your circles.
https://www.googleapis.com/auth/plus.me Know who you are on Google
https://www.googleapis.com/auth/userinfo.email View your email address
https://www.googleapis.com/auth/userinfo.profile View basic
information about your account
It doesn't appear to matter you get back the email in all of the scopes. But what does matter is that the Users email must be set to public in the Account. If its set to anything else, your circles, only you. its not listed. This appears to be true even when you are trying to see your own information. (Sending Me)
Does anyone know how to override the display name of the sender of an instant message using the Microsoft.Lync API?
Thanks
It should be possible using Conversation.Impersonate(...), which contains the following option:
displayName
Type: System.String
The display name of the user to impersonate. Optional.
However, when I tried it, setting the displayname changed nothing. I ended up just setting the uri property to someusername#example.org to show the username. It looks like the Lync client only displays usernames for known users.
What i want to do is when we click on Reply button , the From address field will be populate with the email-id (default team's default queue's email-id). Current scenario is populated with logged in user.
You can create script which will be executed onLoad of email form. Check is it 'Replay' action (Url will contain _InReplyToId parameter). Find queue from original email using his GUID from url, and set it to From field.
EDIT:
This example will solve your problem :)