.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

relative URLs inside of email body in workflow emails?

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :SharePoint
In my auto-generated emails in workflows, I provide the reader a link to a list item on the SP site.  The problem is that I seem to have to provide an absolute URL, which of course changes between development in production.  Is there a solution for this short of editing my workflow when I move to production?  I'm on MOSS 2007 and use SP Designer.

View Complete Post

More Related Resource Links

Background Image In Workflow Custom Email Body


In my workflow I have custom email body, in my email body i want to have background image, but it seems that this tag (<td style="background-image:url()>)is not working, i can put image in my email body and it works well but background image doesn't work, Any Idea?


Inside MSDN: Designing URLs for MSDN2


This is the first installment of a new column about MSDN® projects: what we're doing, how we're doing it, and what we're learning along the way. It will be written by MSDN staff with the goal of sharing the team's experiences in solving the real-world business problems MSDN faces.

Tim Ewald

MSDN Magazine February 2005

Trying to send email using Sharepoint Designer 2007 workflow and email enabled list


I have a a list that recieves email. I have few fields that shows me the originator: "E-Mail From" and "E-Mail Sender".

I am trying to create a workflow that will generate an auto reply to the originator but the SPD fails to recognize the email address in these two fields. It's either truncating part of it or uses the html ( href=mailto:Demo@DemoSomething.com) in the To field.

Thank you,


I can't send email from workflow.


I’ve got strange problem. I’ve created workflow with Visual studio 2008 which works fine. If workflow create task user gets email with alert and it works  - user gets email.   The problem is that I would like to use Workflow component: “SendEmail” for some cases. And if I enter directly into component email address for field: “TO” the message will be delivered. But if I use simple code with the same email address for field ”TO” it doesn’t work (field TO is empty now).

private void sendEmail_ExecuteCode(object sender, EventArgs e)



SPD workflow, emails sent for one user, not for the other


Good day,

I have a SPD workflow (WSS/2007) that take a date field from a document list and when that date occurs it sends an email.  If the date is in the past, it will send the email out right away.  It is working fine for one user, not for another.  Both users have the same permissions.  The workflow goes as follows:

ACTION: Set Variable: vTermdate to DocumentsNotificationDate
       then log Documents:Email Date to the workflow history list

CONDITION: if Variable: vTermdate is not Empty
ACTION: Log term not empty to the workflow history list

CONDITION: if Variable: vTermdate is Empty
ACTION: Set Variable: vTermdate to N/A

ACTION: Add 0 minutes to Documents:Email Date (out to

Send HTML email with banner inside


Hi all,

I want to send html emails with one promo-banner inside. Have a look at my code... I try but with no success.


            Dim strFrom, strTo, strSubject, strBody As String
            Dim myMessage As MailMessage
            Dim mySmtpClient As SmtpClient
            strFrom = "SENDER<test@example.com>"
            strTo = Session("eemaill")
            strSubject = "HELLO THERE!"
            strBody = "HELLO THIS IS MY MSG<br />" + _
            " <script type='text/javascript'> var ai = 899; var rc = 40; var rt= 2; var rc_width = 724; var rc_height = 90; </script>" + _
            " <script type='text/javascript' src='http://assets.example.com/s/ads.js'></script><br /><br />" + _
            "<b>THANK YOU</b>"
            myMessage = New MailMessage(strFrom, strTo, strSubject, strBody)
            myMessage.IsBodyHtml = True
            mySmtpClient = New SmtpClient("mail.example.com")




Thank you

Email enabld list delay on recieving emails


So the situation is, i have a list, that receives emails from a particular account all day long, recently it has started recieving emails "late" being it will mass process emails at various times of the day. Before it proccessed them as soon as they were received.

Event log shows

A critical error occurred while processing the incoming e-mail file C:\Inetpub\mailroot\Drop\e472144001cb44a40000001e.eml. The error was: The process cannot access the file 'C:\Inetpub\mailroot\Drop\e472144001cb44a40000001e.eml' because it is being used by another process..


Have this error everywhere.

        -Restarted SMTP

        -Restarted IIS

It seems SMTP is having issues but wanted to come here and get some insight.


-I havent changed anythign recently except new cable runs to the switch

-There is no mail in the (Drop, Mailbox,Pickup, Queue) folders

-mail setup settings are

              -incoming is set to "Advanced" , no,  server.domain.com

Outgoing is my exange server.



Best regex for email body on contact form?

I'm not sure the best way to do a regex for the body section of an email contact form.  I want to use the regex to prevent more than 150 characters from being entered.  I assume this is sufficient, I may need more.  I also want it to help guard against sql injection attacks. The more I think about it the more characters I can think of that should be allowed.  I want to allow punctuation since it's for an email and people should be using full sentences.  These are some other things that make sense to allow: " , ', : , ; , $ , . , ! , ? , - , _ , @ , & , ( , ). They cover situations when someone may put an email address or phone number in the body section for the email.  I also want to allow letters and numbers.    I'm not sure if it's best to allow the characters I mentioned or not allow characters that pose a potential threat.  I think allowing the ones I want is the best way, but I'm not sure.  Can someone please give an example and/or suggestions?  Are there other characters that should be allowed?  I don't have much yet: "^(?i)[a-z0-9\s]{1,150}$"

.net 3.5 in conjunction with CRM 4.0 email router adding code to subject line of emails causing spam

We use CRM 4.0, which is using .net framework 3.5 SP 1.  Emails sent out of CRM go through and email router and the subject line of these emails is getting "=?us-ascii?Q? added to the beginning of the subject line and "?= added to the end of the subject line. This is causing a large amount of our emails getting spammed. I was told by the CRM support that this is an issue with .net 3.5 and won't be fixed until .net 4.0, which CRM won't support for another year.  Is there not a .net 3.5 patch that can address this?

Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

Hi, Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :( I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.

Sending an workflow email with image

I am trying to include an image in an email that I am sending out from Sharepoint designer. I have followed the below instructions from Microsoft's site and all I get in my email is the text. Anyone have success with this? <img src="http://www.communitywestbank.com/images/cwb_logo.jpg"> or <img src="http://www.communitywestbank.com/images/cwb_logo.jpg"/>       How to from MS site- Include an image It is not possible to embed an image or graphics file in the body of an e-mail message that is sent by your workflow. However, you can include a graphic in your message by using the HTML image tag (<img/>) to link to an image that is stored as a JPEG (.jpg) file and uploaded to a picture library in your site. In the body of your message, in the location where you want the linked image to appear, type the <img src=""/> HTML tag. Position the insertion point between the two double quotation marks (""). Type or paste the URL for the JPEG image file

SQL Server Tables and Exchange Web Services sample does not include email body

I've sucessfuly implemented the above, very useful example. However, I cannot work out how to include the Body of the email with the reast of the data. Can anyone shed some light for me? Thanks Robert

Immediate alert email body is truncated intermittently in MOSS 2007

Hi All, I  am facing one issue with Alert. We have one Posts list in one of the Blog where Alert Me generates immediate alert for the users who have subscribed to the Blogs. Whenever any new Post added, edited or deleted they used to get alerts. But in the alert email, the body of the alert which normally contains the Post decsription gets truncated intermittently. Sometimes it is truncated with less than 2048 characters in the Body filed and some times with more than 4098 characters. I found in some articles that the limitation is 2048 characters in one line after whcih the new line is expected , else the text will be truncated. I am not able to find the logic behind this truncation in default sharepoint alert functionality. Could you please give some more insights on this front? Thnaks:)  

how to send an email using sharepoint designer workflow when an item equals to end time

hi, How to trigger the workflow when current time is equl to end time. I need to send an document when  current time is equl to end time. I am using designer workflows(sharepoint 2007).I have created a variable and i am able to get todays date but not able to get time by default i am getting 12:00:00 Am.i want to get current time. can u please tell me.

SharePoint 2010 email enabled list with workflow has incorrect User ID when items are emailed to the

I have set up an approval workflow for a document library that has email enabled. Emails come into the document library fine, however, if an item is emailed to the library the workflow kicks off with the initiator as "System Account" rather than the person who submitted the email. This makes the error of "The e-mail message cannot be sent. Make sure the e-mail has a valid recipient." come up. If someone submits a document directly to the library (by logging into sharepoint and submitting) everything works fine. The person submitting by email is a valid sharepoint user and the profile shows the correct email address. The Created by and Modified by fields show the correct person (rather than System Account), it's only the workflow User ID that shows incorrectly if document is emailed to library. Any help or ideas would be appreciated. Thanks

workflow email not allowing WF to compile

I have a workflow that is intermittently not working. I have the Action: Send an Email and I am using a SharePoint group to send the email too. Now all of a sudden the workflow won't compile and tells me there are errors. The SharePoint Group is showing up as the problem that won't allow the WF to compile. It looks like this: Email *SharePoint Group* If I put the SharePoint group into the CC field as well as the To field, then the WF compiles. Is this a permission problem?  

Sharepoint 2010 WorkFlow Task AssignedTo Windows Group doesnt send email notification

Hi, Which configuration would prevent sharepoint to send a notification when a workFlow task is assigned to a Windows Group with an email ? The same task with a single User send a notification. Thanks, Patrice      
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend