How to Send Email using office 365 exchange online in C#? - c#-4.0

I have seen many examples related to sending mails via office 365 SMTP but cant find any help for
office 365 exchange online using c#.
It would be great some one can help me in this with an example so that I can understand the difference between these two.

http://msdn.microsoft.com/en-us/library/office/dn567668(v=exchg.150).aspx
This helped me, it has got proper reference for all the queries you might have.

Related

How to get calendar events from Exchange 2016

We are currently running Exchange 2016 in our environment NOT office365. I am not a windows developer or know much about Microsoft products (nothing wrong them them, I just dont have experience with them.) I am building a display that will show me my current calendar events. I am using python and a raspberry pi to do this. I have found the article on google below, but it appears to be only avail for office 365 which we dont use. Is there a way to get the calendar events some other way, or use the Graph API on our exchange server instead of office 365?
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest?redirectedfrom=MSDN
You have two options either:
do the hybrid setup and use the Microsoft Graph API to list events.
Use one of these library, library to connect to the Exchange web service, aka EWS.

SharePoint Online remote authentication

Hi I am trying SharePoint Online remote authentication
Followed couple of options as given in the link below
https://paulryan.com.au/2014/spo-remote-authentication-rest/
I am using sharepoint online. Can someone help me do this.
You could get c# code here, I used the code before.

Searching with Office 365 Unified API

I am having trouble using the new Office 365 Unified API for searching for email. I would really appreciate it if I could get some help.
I get the following error:
{"error":{"code":"ErrorInvalidArgument","message":"The value specified for search scope 'PrimaryMailbox' is invalid."}}
I was able to get the access token for graph.microsoft.com and retrieve all the messages from my inbox by doing a GET to "https://graph.microsoft.com/beta/me/messages".
However, when I add the search parameter $search="Tomcat", I get the error copied above. Any ideas how I can resolve this? Is there any documentation to clarify this? I have searched the Office Dev Center documentation in detail but could not find anything to help with searching in the Unified API. Eventually, I want to use the Unified API to search for users' contacts, calendar entries, OneDrive files, and SharePoint online.
On a related note, I can successfully search for mail messages using the existing Office 365 API by making a GET call to "https://outlook.office365.com/api/v1.0/me/messages". However, I am more interested in the streamlined Unified API approach and hope I can resolve the above issue.
Also, is there a way to search all mailboxes in a single search using either the existing API (https://outlook.office365.com) or the new Unified API (https://graph.microsoft.com/)?
Thanks.
Mohammad
San Jose, CA
The Unified API preview documentation lists all supported query parameters, and $search isn't included. It does support $filter, so you can do some basic searches using that.
The Mail API does support $search, but there is no way to search across multiple mailboxes in one query.
You can use the below conditions for searching in outlook
to search in particular folder(Ex: Drafts,Inbox)--/me/MailFolders/Inbox/messages?$search={1} : where 1 will be your search text
If you want to search in all folders then /me/MailFolders/Allitems/messages?$search={1}: where {1} is the text you want to search

Using SharePoint 2010 as a support forum

I was wondering if there are any specific tools to use in SharePoint 2010 to create a support forum/StackOverFlow type of Q&A forum. I know that there is tooling to make a discussion board:
http://office.microsoft.com/en-us/sharepoint-server-help/create-a-discussion-board-HA010086728.aspx
But I do not know of any other kind of tools. Also, are there limitations to doing something like this is SharePoint 2010 (important things that cannot be done in SharePoint in this regard)?
If anyone has had any experience doing something like this that would be a huge help!
SharePoint 2010 discussion board can be used in this matter, but you have to think about authentication: How are people going to authenticate with you SharePoint portal? You can implement a new authentication provider, or you only use Active Directory, or you use LiveID, Facebook / ....
Office 365 will make this a lot easier with the out-of-the-box integration with LiveID.
But, yes, you can create a support forum in SharePoint! Using taxonomy you can replicate the tagging used here at SO.

Send EMail in Sharepoint Online 2013

I want to send an Email in Sharepoint online. I used the following method to send the mail using the Event reciever.
SPUtility.SendEmail(SPContext.Current.Web, headers, bodyText.ToString());
But it does not work with sharepoint online 2013.
After reading in the articles I got to know that SPUtility method cannot be used. Please provide me a solution to send mail through event reciever. I am creating it as a Sandbox Solution.
Can we Use Microsoft Exchange Server? How Can I use it?
Thanks for the helps!
You could use a workaround by leveraging the SendMail activity in a workflow. This is also explained here: Guru Tip: Sending an Email in Office 365.
Unfortunately using this workflow workaround will be your only choice as both SPUtility.SendEmail as well as System.Net.Mail.SmtpClient are not allowed in Sandboxed solutions which is also explained in this post: Send email via code in Office365
How to import Emails or part of the Email data to Sharepoint libraries or Sharepoint lists you can find on "The smart way from mailbox to Sharepoint". It works fine for Sharepoint online.

Resources