Send EMail in Sharepoint Online 2013 - sharepoint

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.

Related

Events and COM Add-in like operations in Outlook-Web add ins

I'm trying to create an outlook web add-in using Node.js in which I am trying to do the following things:
make an API call on receiving email
label emails
move emails to spam
get all emails of a specific folder
Is this possible? If Yes then how? Please give me the links to any documentation or tutorials for the same.
These things, I am able to do in the desktop VSTO COM add-in for the desktop application.
For developing an add-in for outlook please refer to https://learn.microsoft.com/en-us/outlook/add-ins/
Make an API call on receiving email: Using the current add-in api set available this is not possible.
label emails: Categories API is available in the preview version: https://learn.microsoft.com/en-us/javascript/api/outlook/office.categories?view=office-js
Move emails to spam: You can use MS Graph API in the add-in https://learn.microsoft.com/en-us/graph/api/message-move?view=graph-rest-1.0&tabs=cs
Get all emails of a specific folder: Please refer to MS Graph API for this https://learn.microsoft.com/en-us/graph/api/message-get?view=graph-rest-1.0&tabs=cs

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

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

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.

Sharepoint Instant Messaging

Is there a webpart that can easily be dropped into our Sharepoint that shows all company users online and with the ability to instant message them. Currently everyone is using various IM clients and would like to see something integrated within our intranet: sharepoint
https://sharepointmessenger.codeplex.com/ I have been developing this. It might help you out.

SharePoint - set reply-to in a workflow

I have my SharePoint server set to send e-mails from a dedicated e-mail box. However, I have a workflow that sends an e-mail out to a particular group, and I want replies from that group to go instead to a different e-mail box.
I know that BCC is a hidden field in a workflow that can be changed; I don't see anything for reply-to. So I'm not sure that there's an easy way to do it. What options do I have? I know there's a tool on CodePlex that does a lot with e-mail activities, but I think that might be overkill.
I appreciate any suggestions, advice, etc. Thanks very much!
Basically, you can't specify a reply-to email address using SharePoint Designer out of the box. Since it is a workflow, you can create a Custom Workflow action that would allow you to do anything you want (including send an email with a reply-to address). This is a pretty involved process and will require C# code.

Resources