Tag Info

New answers tagged

1

You are right SP doesn't allow to send you attachments from code so instead use Plain .NET classes and write the code here is a sample you may find helpful. You can attach multiple attachments by repeating add() method. MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); ...


2

SPUtility.GetLoginNameFromEmail can be used to get login name. SPUtility.GetIdentifierFromEmail can be used to get user id.


1

If this is a SharePoint Designer workflow, you can choose to get the display name out of the people picker field instead of the login name.


0

By default, workflows are not triggered on lists or libraries with incoming email enabled. This needs to be manually enabled with powershell. $spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled = $true $spWebService.Update() ...


1

Try putting a one minute pause in front of your email being sent. There can be a lag and the email gets triggered twice.


0

Assuming you are opening the new item form from a custom page or providing a link somewhere, you can handle redirection on submit via the Source parameter in the URL query string. Just set it to the page you wish to redirect to: <new item page link>?source=<link for page to redirect after submit>


0

You can override "_CorrectUrlForRefreshPageSubmitForm" Java script function of SharePoint's Core.js. You can find this : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\core.js Please refer this link for best practice that how to override core.js ...


0

Getting the message stream using SPEMailMessage.GetMessageStream() still contains the attachments however I was able to use String.SubString() to remove everything after closing <\html>, leaving the message body and headers (minus the attachments). SPFolder folder = list.RootFolder; string folderUrl = folder.Url; string emailUrl = ...


1

SharePoint cannot send email to itself: http://thesharepointfarm.com/2013/03/sharepoint-cannot-send-mail-to-itself/ If you can strip out the X-Mailer value, then you'll be golden.


0

For better output as well as solution for this you do one thing. 1.Save your mail subject and body in a separate list as different columns. 2.Then fetch the list data in your method. After that bind the list columns for your email subject and body. using this practice your issue for the special characters will be resolved as well as you can provide ...


0

Date Created returns date and time, but Today returns only date (12:00 AM). So they are not equal, and your condition is never true. -- Evgenii Vilkov It's true, so use the below action during comparison. Change compare action equal to equals(ignoring time)


0

In SharePoint 2013 the delimiter changed to comma. If this doesn't work something else is wrong - check ULS log in this case for errors (typo, SMTP error, ...).



Top 50 recent answers are included