Tuesday, June 17, 2008

Limitation of Send Mail activity in workflow and its solution

Hi All,

There is one limitation of Send Mail activity if you are working with workflow.( Currently i don't know any other limitations :) .once i come to know i would like to post them..so just wait...)

Limitation is that you cannnot send attachment with sendmail activity.

so if your requirement is to send attachment in workflow, take your hand off from sendmail activity. Instead use code activity and use System.Net.Mail by using MailMessage class to send a mail.

Simple solution , isn't it!!!

3 comments:

Anonymous said...

Hi Malay,

This is regarding limitations with SendMail() method.
I've found the same limitation (attachment issue) and started using System.Net.Mail object.
Another doubt is...
Can we send mails to external mail servers such as gmail (ex. xxx@gmail.com) / yahoo (ex. xxx@yahoo.com) ?

Thanks,
Amar

Malay Vasavada said...

Hi Amar,

Yes you can send a mail to external servers using System.Net.Mail.

Anonymous said...

Hi Malay,

Actually, my doubt was can we send mails to external mail servers such as gmail/yahoo using Sharepoint.Utilities.SendMail() method.

Thanks
Amar




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com