Wednesday, April 13, 2011

SharePoint 2007 Alert Mail Issue

SharePoint 2007 Alert Mail Issue



I came across an issue today related to alert mail not getting delivered whenever I modify or create a task item. Initially I was not getting the alert creation email as well. Following are the steps followed
Step 1.

Check whether the SMTP server is working. Below is a simple code to verify the service is working or not.
using System;
using System.Net.Mail;
public class Program
{
public static void Main(string[] args)
{
try
{
// Check arguments
if (args.Length != 3)
{
Show();
return;
}

// Create message
MailMessage mmMessage = new MailMessage();
mmMessage.To.Add(new MailAddress(args[2] as string));
mmMessage.From = new MailAddress(args[1] as string);
mmMessage.Subject = "TestMail";
mmMessage.Body = "This is a test";

// Send message
SmtpClient sc = new SmtpClient(args[0] as string);
sc.Send(mmMessage);

}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}

private static void Show()
{
Console.WriteLine("TestMail [SmtpServer] [FromAddress] [ToAddress]");
}

}
Save the file as SMTPTest.cs
Open the Visual Studio command prompt and execute the below
>csc.exe /out:SMTPTest.exe SMTPTest.cs
>SMTPTest.exe [SMTP Server IP address][FromAddress][ToAddress]
If you receive a mail then the SMTP servvice is working fine.

Step 2.

Open the Central Administration – Operation -> Topology and Services -> Outgoing e-mail settings
Enter the outbound SMTP server address and the other details. Click OK.
Verify if the email alerts are going.

Step 3.

Open the Central Administration ->Application Management -> Web application outgoing e-mail settings
Select the web application and verify the outbound smtp server.
Verify if the email alerts are going.

Step 4.

Check out the stsadm command in the below link to verify if the alerts are enabled.
http://sharepointalert.info/
Verify if the email alerts are going.

Step 5.

Check the Windows SharePoint Services Timer Service, if it is started. If the service is not started then start the services.
Verify if the email alerts are going.
Please reset IIS if the alerts mails are not going.

Tuesday, April 12, 2011

Is HTML5 replacing SIlverlight

Please check this blog
http://team.silverlight.net/announcement/standards-based-web-plug-ins-and-silverlight/

Monday, April 11, 2011

SOLID

SOLID but for those who don’t know, it stands for Single Responsibility, Open/Closed Principle, Liskov substitution, Interface Segregation and Dependency Inversion, introduced by Robert C. Martin, which is basically a collection of principles that one should keep in mind while creating a system that’s easy to maintain and extend over time

The file is not part of the project or its Build Action property is not set to Resource

I wanted to play .wmv file in my website using the Silverlight Media Element. Here is the Syntax

<mediaelement name="media" source="Test.wmv" width="300" height="300">

But I was getting the error. "The file is not part of the project or its Build Action property is not set to 'Resource'.

I modified the Source attribute of the Media Element as shown below and it worked.

<mediaelement name="media" source="/[SolutionName];component/Test.wmv" width="300" height="300">