Email notifications not working :-(

Topics: Core, Installing BugNET
Aug 30, 2012 at 6:02 PM

Gentle people,

i've downloaded the latest source, compiled, published and configured BugNET.

Everything working smooth and fine, only no E-mail notifications.
I check the server realtime smtp log, but there is never an e-mail send tot my email server.
Credentials etc are all fine.

Read about a email notification problem, but somehow this is not fixed in the latest source code?

I need this feature badly. Thank you for you help!


Hal. 

Aug 31, 2012 at 6:19 PM

Please see this source which was fixed after the last release and the source package may not have been updated.

http://bugnet.codeplex.com/SourceControl/network/forks/mkrnic/BugNetFork/contribution/3317#src%2fBugNET_WAP%2fProviders%2fDataProviders%2fSqlDataProvider%2fBugNet.Schema.SqlDataProvider.sql

Aug 31, 2012 at 9:33 PM

Thanx Dubeaud, but with this latest release still not working. Where seems to be the problem, so I can look in the code to fix this?

Sep 5, 2012 at 3:17 PM

There was a change to email notifications that you will not receive notifications for your own actions.

Also, does the test notification work from the admin page?

Sep 5, 2012 at 3:29 PM

Nope test doesn't work either. Why won't you update the downloads to the latest release, where this all works so i can install

the package instead of the source code? :-)

Thanks!

Sep 5, 2012 at 6:27 PM

The test link in the admin section does not use the notification code it sends an email directly using the .NET SmtpClient class and the settings you have entered on the page.

If this does not work then either your configuration for SMTP is incorrect in BugNET or there is something stopping the SmtpClient from sending emails to your email server.

What you can try is create a new Console application in Visual Studio and cut and paste the code below overwriting the Program.cs contents (you will need to reference the System.Net assemblies).  Run it and see if it throws any exceptions, you can also debug it and see the exception that is being thrown, might be in the InnerException.

using System;
using System.Net;
using System.Net.Mail;

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			const bool smtpUseSSL = false;
			const int smtpPort = 25;
			const string smtpHost = "SERVER_NAME";
			const string smtpUserName = "";
			const string smtpPassword = "";
			const string smtpDomain = "";

			const string fromAddress = "FROM_ADDRESS";
			const string toAddress = "TO_ADDRESS";
			const string emailSubject = "Test Smtp Email";
			const string emailBody = "Test Smtp Email";

			var smtp = new SmtpClient(smtpHost, smtpPort) { EnableSsl = smtpUseSSL };

			if(smtpUserName.Trim().Length > 0)
			{
				smtp.Credentials = new NetworkCredential(smtpUserName, smtpPassword, smtpDomain);
			}

			var message = new MailMessage(fromAddress, toAddress, emailSubject, emailBody) { IsBodyHtml = false };

			smtp.Send(message);

			Console.WriteLine("Press a key to quit");
			Console.ReadLine();
		}
	}
}
Feb 28, 2013 at 8:39 AM
Hi , it is not working for me too ...
I have tested with test button on Aplication Configuration page. And gotemail on host email address.

But have no notification on any bugs update, although set up user in notification list.
Sep 7, 2013 at 7:41 AM
Hello,

I have a different problem. i just configured the latest solution BugNET 1.5.258.0
and the problem is

if the mail which is sending noreply@site.com, users will receive a letter in which mail admin@site.com, mike@site.com, etc. But users who have mail ********@gmail.com or ********@live.com not receive the emails!
Sep 8, 2013 at 10:09 AM
Hi,

i have the same problem after updating to version 1.5.
I have tried the code from above and I receive the following exception:
SmtpFailedReceipientException
Mailbox not available. The Serverreply was: 5.7.1 Unable to relay for <mailadress outside the own domain>

It was no problem with version 1.2.x.x
Was there a change between these two versions? We didn't change anything on our exchange server. Only installing patches.
When I did a roll back to version 1.2 i didn't receive any errors in the log.

Alex
Sep 8, 2013 at 12:11 PM
in my case I was the problem.
Probably I had an error in transfering the web.config information and I had a wrong password for the smtp authentication.
Interesting, that even with the wrong password of the mail sender I was able to send emails inside the domain and received an a little bit confusing exception.
But after setting the password correctly I was again able to send mails to the outside world againg.